On Wed, 28 Apr 2004, Christopher Faylor wrote: > On Wed, Apr 28, 2004 at 12:41:51PM -0500, Brian Ford wrote: > This patch would only affect non-main threads. It would not affect the > main thread. Wouldn't you need to do the same thing for the main thread? > I don't understand why it would be different.
Something already does. I didn't try and track down the what/why. 00401060 <_main>: 401060: 55 push %ebp 401061: b8 10 00 00 00 mov $0x10,%eax 401066: 89 e5 mov %esp,%ebp 401068: 83 ec 08 sub $0x8,%esp 40106b: 83 e4 f0 and $0xfffffff0,%esp <-- SEE This problem doesn't happen for the main thread. I'll try to pin the who down if you like. > >2004-04-28 DJ Delorie <[EMAIL PROTECTED]> > > > > * init.cc (threadfunc_fe): Hack to make thread stacks always 16 > > byte aligned. > > > >Index: init.cc > >=================================================================== > >RCS file: /cvs/src/src/winsup/cygwin/init.cc,v > >retrieving revision 1.32 > >diff -u -p -r1.32 init.cc > >--- init.cc 22 Mar 2004 18:30:38 -0000 1.32 > >+++ init.cc 28 Apr 2004 17:38:03 -0000 > >@@ -27,6 +27,8 @@ HANDLE sync_startup; > > static void WINAPI > > threadfunc_fe (VOID *arg) > > { > >+ (void)__builtin_return_address(1); > >+ asm volatile ("andl $-16,%%esp" ::: "%esp"); > > _cygtls::call ((DWORD (*) (void *, void *)) (((char **) > >_tlsbase)[OLDFUNC_OFFSET]), arg); > > } -- Brian Ford Senior Realtime Software Engineer VITAL - Visual Simulation Systems FlightSafety International the best safety device in any aircraft is a well-trained pilot... -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/