public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/46094] New: -fsplit-stack doesn't honour x86_64 ABI wrt. stack alignment
@ 2010-10-20 11:23 zsojka at seznam dot cz
0 siblings, 0 replies; only message in thread
From: zsojka at seznam dot cz @ 2010-10-20 11:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46094
Summary: -fsplit-stack doesn't honour x86_64 ABI wrt. stack
alignment
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: zsojka@seznam.cz
If I understand http://www.x86-64.org/documentation/abi.pdf correctly, and the
ABI described here is valid enough, -fsplit-stack doesn't align stack correctly
when calling functions.
At the moment of function entry, this should hold: (rsp&15)==8
As example, I will use the testcase from PR46093 (
http://gcc.gnu.org/bugzilla/attachment.cgi?id=22091 ). There are values of rsp
at the moment of function entry:
GDB breakpoints:
b main
b foo
b __morestack
b __morestack_block_signals
b __generic_morestack
b __morestack_unblock_signals
b __generic_releasestack
b pthread_sigmask
b sigprocmask
(for some reason, breakpoint at __morestack wasn't set correctly by this
procedure, so I had to set it manually)
function rsp
main 0x7fffffffde58
__morestack 0x7fffffffde50
__morestack_block_signals 0x7fffffffddf0
sigprocmask 0x7fffffffddf0
__generic_morestack 0x7fffffffde00
__morestack_unblock_signals 0x7ffff7ff9ff8
sigprocmask 0x7ffff7ff9ff8
foo 0x7ffff7ff5fe8
...
this could cause problem if (for example) sigprocmask() used SSE instructions
to access stack
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-10-20 11:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-20 11:23 [Bug target/46094] New: -fsplit-stack doesn't honour x86_64 ABI wrt. stack alignment zsojka at seznam dot cz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).