git: libc/setjump: Align stack at 16-bytes before function call
John Marino
marino at crater.dragonflybsd.org
Tue Nov 11 06:19:55 PST 2014
commit a77a7390aa9dc46b32dbffb069a6bb801d599ede
Author: John Marino <draco at marino.st>
Date: Tue Nov 11 13:58:14 2014 +0100
libc/setjump: Align stack at 16-bytes before function call
This is required by amd64 ABI. Comments were added where stack was
"accidentally" properly aligned. The problem manifested on with a
bus error when built by clang.
While here, preserve the floating float exceptions flags. Per POSIX,
siglongjump() shall be equivalent to longjump() except that it must
match sigsetjump() instead of setjump() and except for the effect on the
signal mask. Therefore it should preserve the FP exception flags.
Also add the GNU-stack notes, all libc object files are supposed to have
them (although I am pretty sure they don't).
Taken from:
FreeBSD svn 217106 (7 Jan 2011)
FreeBSD svn 227023 (2 Nov 2011)
FreeBSD svn 267307 (9 Jun 2014)
Summary of changes:
lib/libc/x86_64/gen/setjmp.S | 5 +++++
lib/libc/x86_64/gen/sigsetjmp.S | 6 +++++-
2 files changed, 10 insertions(+), 1 deletion(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/a77a7390aa9dc46b32dbffb069a6bb801d599ede
--
DragonFly BSD source repository
More information about the Commits
mailing list