This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Misaligned stack on 32-bit s390?
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>, Siddhesh Poyarekar <siddhesh at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 11 Nov 2014 00:31:42 -0500
- Subject: Misaligned stack on 32-bit s390?
- Authentication-results: sourceware.org; auth=none
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.