NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: lib/39465: threads stack is not aligned properly for gcc on i386
The following reply was made to PR lib/39465; it has been noted by GNATS.
From: Anthony Mallet <anthony.mallet%useless-ficus.net@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: lib-bug-people%netbsd.org@localhost,
gnats-admin%netbsd.org@localhost,
netbsd-bugs%netbsd.org@localhost
Subject: Re: lib/39465: threads stack is not aligned properly for gcc on i386
Date: Wed, 9 Nov 2011 22:06:59 +0100
On Wednesday, at 21:00, Anthony Mallet wrote:
| Does it make more sense like this? - apart from the fact that the ABI
requires
| 4 bytes alignment only, of course, but that's another issue -
Also, this comment in the OpenBSD commit for the same problem is interesting:
/*
* Locate the initial frame at the top of the stack. For the
* stack to end up properly (16-byte) aligned, we need to
* align the frame at an odd 8-byte boundary.
*/
f = (struct frame *)((((int)base + len - sizeof *f) & ~15) - 8);
http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libpthread/arch/i386/uthread_machdep.c.diff?r1=1.5;r2=1.6;f=h
Home |
Main Index |
Thread Index |
Old Index