From eebaf54024e43902c3aac2ba2ebcc28f7c797b8f Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Tue, 4 Feb 2014 19:57:50 -0500 Subject: [PATCH] Set child stack alignment in trace-clone.c - This is important on aarch64, which requires 16-byte aligned stack pointer. This might be relevant on other arches as well, I suspect we just happened to get the 16-byte boundary in some cases. --- testsuite/ltrace.minor/trace-clone.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/testsuite/ltrace.minor/trace-clone.c b/testsuite/ltrace.minor/trace-clone.c index db1936d..ded930c 100644 --- a/testsuite/ltrace.minor/trace-clone.c +++ b/testsuite/ltrace.minor/trace-clone.c @@ -8,6 +8,7 @@ #include #include #include +#include int child () { @@ -22,7 +23,8 @@ typedef int (* myfunc)(); int main () { pid_t pid; - static char stack[STACK_SIZE]; + static __attribute__ ((aligned (16))) char stack[STACK_SIZE]; + #ifdef __ia64__ pid = __clone2((myfunc)&child, stack, STACK_SIZE, CLONE_FS, NULL); #else -- 2.7.4