[ltrace-commits] 02/02: Set child stack alignment in trace-clone.c

Petr Machata pmachata-guest at moszumanska.debian.org
Wed Feb 5 01:00:55 UTC 2014


This is an automated email from the git hooks/post-receive script.

pmachata-guest pushed a commit to branch pmachata/aarch64
in repository ltrace.

commit fa4a11fc9e8bee2c0706b3d76d5d31ea84bfa76a
Author: Petr Machata <pmachata at apm-mustang-ev2-02.ml3.eng.bos.redhat.com>
Date:   Tue Feb 4 19:57:50 2014 -0500

    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 <sys/types.h>
 #include <stdlib.h>
 #include <sched.h>
+#include <unistd.h>
 
 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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/ltrace.git



More information about the ltrace-commits mailing list