Re: 16 byte pthread stack alignments

2012-01-09 Thread Corinna Vinschen
On Jan 9 09:41, Brian Ford wrote: > On Mon, 9 Jan 2012, Corinna Vinschen wrote: > > > On Dec 27 18:06, Brian Ford wrote: > > > On Fri, 23 Dec 2011, Corinna Vinschen wrote: > > > > > > > Sorry, but what I don't get from your reply is if the andl worked or > > > > not. > > > > > > No; by itself, it

Re: 16 byte pthread stack alignments

2012-01-09 Thread Brian Ford
On Mon, 9 Jan 2012, Corinna Vinschen wrote: > On Dec 27 18:06, Brian Ford wrote: > > On Fri, 23 Dec 2011, Corinna Vinschen wrote: > > > > > Sorry, but what I don't get from your reply is if the andl worked or > > > not. > > > > No; by itself, it does not. Adding a "subl $12, %%esp" following it s

Re: 16 byte pthread stack alignments

2012-01-09 Thread Corinna Vinschen
On Dec 27 18:06, Brian Ford wrote: > On Fri, 23 Dec 2011, Corinna Vinschen wrote: > > > On Dec 22 12:51, Brian Ford wrote: > > > On Wed, 21 Dec 2011, Corinna Vinschen wrote: > > > > > > > On second thought I'm a bit puzzled that the pthread stack isn't > > > > correctly aligned as well. Ignoring

Re: 16 byte pthread stack alignments

2011-12-27 Thread Brian Ford
On Fri, 23 Dec 2011, Corinna Vinschen wrote: > On Dec 22 12:51, Brian Ford wrote: > > On Wed, 21 Dec 2011, Corinna Vinschen wrote: > > > > > On second thought I'm a bit puzzled that the pthread stack isn't > > > correctly aligned as well. Ignoring the pthread_attr_setstack case > > > which wasn't

Re: 16 byte pthread stack alignments

2011-12-23 Thread Corinna Vinschen
On Dec 22 12:51, Brian Ford wrote: > On Wed, 21 Dec 2011, Corinna Vinschen wrote: > > > On second thought I'm a bit puzzled that the pthread stack isn't > > correctly aligned as well. Ignoring the pthread_attr_setstack case > > which wasn't supported so far anyway, the OS stack set up by > > Crea

Re: 16 byte pthread stack alignments

2011-12-22 Thread Brian Ford
On Wed, 21 Dec 2011, Corinna Vinschen wrote: > On second thought I'm a bit puzzled that the pthread stack isn't > correctly aligned as well. Ignoring the pthread_attr_setstack case > which wasn't supported so far anyway, the OS stack set up by > CreateThread is 64K aligned. From that 64K aligned

Re: 16 byte pthread stack alignments

2011-12-22 Thread Brian Ford
On Thu, 22 Dec 2011, Corinna Vinschen wrote: > Btw., you are apparently not running the latest gcc-4. I just tried to > compile this file (without my patch) on Cygwin and it works fine without > any warning or error: > > $ gcc --version > gcc (GCC) 4.5.3 You are correct, although I just ran

Re: 16 byte pthread stack alignments

2011-12-22 Thread Brian Ford
On Thu, 22 Dec 2011, Corinna Vinschen wrote: > The error message is kind of nonsense anyway. The expression in question > is > > sizeof (cygheap_exec_info) + (nprocs * sizeof (children[0])) > > so it's just a `sizeof', not an actual usage of the member. Try this > for now: > > Index: sigproc.c

Re: 16 byte pthread stack alignments

2011-12-22 Thread Corinna Vinschen
On Dec 22 16:31, Corinna Vinschen wrote: > On Dec 22 09:20, Brian Ford wrote: > > On Thu, 22 Dec 2011, Corinna Vinschen wrote: > > > > > On Dec 21 15:25, Brian Ford wrote: > > > > On Wed, 21 Dec 2011, Brian Ford wrote: > > > > > > > > Thanks for the fix Christopher, but I must be using the wrong c

Re: 16 byte pthread stack alignments

2011-12-22 Thread Corinna Vinschen
On Dec 22 09:20, Brian Ford wrote: > On Thu, 22 Dec 2011, Corinna Vinschen wrote: > > > On Dec 21 15:25, Brian Ford wrote: > > > On Wed, 21 Dec 2011, Brian Ford wrote: > > > > > > Thanks for the fix Christopher, but I must be using the wrong compiler or > > > something. Here's my next issue: > >

Re: 16 byte pthread stack alignments

2011-12-22 Thread Brian Ford
On Thu, 22 Dec 2011, Corinna Vinschen wrote: > On Dec 21 15:25, Brian Ford wrote: > > On Wed, 21 Dec 2011, Brian Ford wrote: > > > > Thanks for the fix Christopher, but I must be using the wrong compiler or > > something. Here's my next issue: > > > > src/winsup/cygwin/child_info.h: > > In static

Re: 16 byte pthread stack alignments

2011-12-22 Thread Corinna Vinschen
On Dec 21 15:25, Brian Ford wrote: > On Wed, 21 Dec 2011, Brian Ford wrote: > > > Still trying, but getting the following warning turned into an error by > > -Werror which looks like it might be valid? > > > > cc1plus: warnings being treated as errors > > src/winsup/cygwin/fhandler.cc: > > In memb

Re: 16 byte pthread stack alignments

2011-12-21 Thread Brian Ford
On Wed, 21 Dec 2011, Brian Ford wrote: > Still trying, but getting the following warning turned into an error by > -Werror which looks like it might be valid? > > cc1plus: warnings being treated as errors > src/winsup/cygwin/fhandler.cc: > In member function fhandler_base_overlapped::wait_return >

Re: 16 byte pthread stack alignments

2011-12-21 Thread Brian Ford
On Wed, 21 Dec 2011, Brian Ford wrote: > I'm trying to test now, but I haven't built cygwin in years so I'm still > working to get things set up. Still trying, but getting the following warning turned into an error by -Werror which looks like it might be valid? cc1plus: warnings being treated as

Re: 16 byte pthread stack alignments

2011-12-21 Thread Corinna Vinschen
On Dec 21 10:22, Brian Ford wrote: > On Wed, 21 Dec 2011, Corinna Vinschen wrote: > > > On Dec 21 15:20, Dave Korn wrote: > > > GCC assumes that the stack starts off 16-aligned when the OS hands over > > > to > > > the exe's entrypoint, and then makes sure it stays that way by always > > > rou

Re: 16 byte pthread stack alignments

2011-12-21 Thread Brian Ford
On Wed, 21 Dec 2011, Corinna Vinschen wrote: > On Dec 21 15:20, Dave Korn wrote: > > GCC assumes that the stack starts off 16-aligned when the OS hands over to > > the exe's entrypoint, and then makes sure it stays that way by always > > rounding > > stack frame sizes up to the nearest multiple

Re: 16 byte pthread stack alignments

2011-12-21 Thread Brian Ford
I'm sorry. I should have learned by now not to post at the last minute before leaving for the day. I always make mistakes and leave out important information. Thanks for considering my problem in spite of these oversights. More below... On Wed, 21 Dec 2011, Corinna Vinschen wrote: > On Dec 20

Re: 16 byte pthread stack alignments

2011-12-21 Thread Corinna Vinschen
On Dec 21 15:20, Dave Korn wrote: > On 21/12/2011 09:42, Corinna Vinschen wrote: > > > But OTOH I have to admit that I don't see how this alignment business > > worked at all. Aligning the stack to 16 byte in mainCRTStartup doesn't > > guarantee that the stack is still 16 byte aligned in main().

Re: 16 byte pthread stack alignments

2011-12-21 Thread Dave Korn
On 21/12/2011 09:42, Corinna Vinschen wrote: > But OTOH I have to admit that I don't see how this alignment business > worked at all. Aligning the stack to 16 byte in mainCRTStartup doesn't > guarantee that the stack is still 16 byte aligned in main(). If that > worked so far, it seems like a mi

Re: 16 byte pthread stack alignments

2011-12-21 Thread Corinna Vinschen
On Dec 21 10:42, Corinna Vinschen wrote: > On Dec 20 17:45, Brian Ford wrote: > > I'm just headed home from work right now, but I thought I would let you > > know of a regression from 1.7.9. It appears the effect of this patch: > > > > http://www.cygwin.com/ml/cygwin-cvs/2004-q2/msg00124.html > >

Re: 16 byte pthread stack alignments

2011-12-21 Thread Corinna Vinschen
On Dec 20 17:45, Brian Ford wrote: > I'm just headed home from work right now, but I thought I would let you > know of a regression from 1.7.9. It appears the effect of this patch: > > http://www.cygwin.com/ml/cygwin-cvs/2004-q2/msg00124.html > > is no longer working in the current snapshot. I'

16 byte pthread stack alignments

2011-12-20 Thread Brian Ford
I'm just headed home from work right now, but I thought I would let you know of a regression from 1.7.9. It appears the effect of this patch: http://www.cygwin.com/ml/cygwin-cvs/2004-q2/msg00124.html is no longer working in the current snapshot. I'll try to narrow it down to which change caused