public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* Misaligned stack on 32-bit s390?
@ 2014-11-11  5:31 Carlos O'Donell
  2014-11-11  9:28 ` Richard Henderson
  0 siblings, 1 reply; 19+ messages in thread
From: Carlos O'Donell @ 2014-11-11  5:31 UTC (permalink / raw)
  To: Andreas Krebbel, Siddhesh Poyarekar, GNU C Library

Andreas,

In sysdeps/s390/s390-32/dl-machine.h:

174         # Adjust the stack pointer to skip _dl_skip_args words.\n\
175         sll   %r1,2\n\
176         ar    %r15,%r1\n\

This misalign the stack.

The 32-bit ABI requires an 8-byte alignment.

If we skip over 4 bytes the stack is no longer aligned.

We're seeing crashes when running the dynamic loader manually
as the unaligned stack is passed to the IFUNC resolver which
uses an instruction that expects an aligned stack
e.g. "stfle   96(%r15)"

Any clever ideas on how to fix this without copying up a large
portion of the stack?

Cheers,
Carlos.

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2014-11-13  9:46 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-11  5:31 Misaligned stack on 32-bit s390? Carlos O'Donell
2014-11-11  9:28 ` Richard Henderson
2014-11-11  9:50   ` Carlos O'Donell
2014-11-11 10:20     ` Richard Henderson
2014-11-11 13:35     ` Siddhesh Poyarekar
2014-11-11 14:54     ` Andreas Krebbel
2014-11-11 16:33       ` Andreas Schwab
2014-11-12  4:00       ` Carlos O'Donell
2014-11-12  7:09         ` Siddhesh Poyarekar
2014-11-12  7:19           ` Richard Henderson
2014-11-12  8:16             ` Siddhesh Poyarekar
2014-11-12 15:42               ` Stefan Liebler
2014-11-13  5:19                 ` Siddhesh Poyarekar
2014-11-13  9:46                 ` Andreas Krebbel
2014-11-12 13:51           ` Carlos O'Donell
2014-11-12  9:05         ` Andreas Krebbel
2014-11-12 21:46           ` Rich Felker
2014-11-12 22:17             ` Andreas Schwab
2014-11-11 18:19     ` Andreas Krebbel

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).