This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: strace crash (TLS data not initializing?)


Well here's the problem, gcc got too smart and optimized out the stack buffer.

int
main (int argc, char **argv)
{
  4074c0:       56                      push   %rsi
  4074c1:       53                      push   %rbx
  4074c2:       48 83 ec 28             sub    $0x28,%rsp
  4074c6:       89 cb                   mov    %ecx,%ebx
  4074c8:       48 89 d6                mov    %rdx,%rsi
  4074cb:       e8 e0 d9 ff ff          callq  404eb0 <__main>
     reliably.  This problem has been noticed under AllocationPreference
     registry setting to 0x100000 (TOP_DOWN). */
  char buf[CYGTLS_PADSIZE];

  memset (buf, 0, sizeof (buf));
  exit (main2 (argc, argv));
  4074d0:       89 d9                   mov    %ebx,%ecx
  4074d2:       48 89 f2                mov    %rsi,%rdx
  4074d5:       e8 56 b0 ff ff          callq  402530 <_Z5main2iPPc>
  4074da:       89 c1                   mov    %eax,%ecx
  4074dc:       e8 57 fd ff ff          callq  407238 <exit>




--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]