Ensure CALL_FN_xx macros align the stack properly
The CALL_FN_xx macros in valgrind.h perform function calls by
signalling to valgrind using the client request system. Because
they are making function calls which are invisible to the compiler
they need to make sure that any stack alignment constraints
imposed by the ABI are enforced when making the call.
This commit enforces 16 byte alignment for x86, amd64, ppc32 and
ppc64 platforms, and 8 byte alignment for arm platforms.
It does not touch s390x where the ABI requires 8 byte alignment to
be maintained at all times, not just when making a function call.
It also does not touch mips32 as I'm not currently aware what if
any alignment constraints exist there.
Fixes BZ#304054 and observed alignment faults on amd64 when running
the regtests using a valgrind compiled with gcc 4.7 releases.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12811 a5019735-40e9-0310-863c-91ae7b9d1cf9
1 file changed