]> granicus.if.org Git - strace/commitdiff
test/threaded_execve: fix on metag
authorJames Hogan <james.hogan@imgtec.com>
Wed, 1 May 2013 12:16:50 +0000 (13:16 +0100)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 1 May 2013 14:55:54 +0000 (14:55 +0000)
The metag ABI has stacks growing upwards so clone expects the stack
argument to point at the bottom of the stack instead of the top.

* test/threaded_execve.c [__metag__]: Define clone2 differently
to avoid a segfault at runtime.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
test/threaded_execve.c

index 628589a3059e1896bf308e18672eea3f972927ed..4c21688c111565e06c80eb976b18830b98d3462a 100644 (file)
@@ -54,6 +54,9 @@
 extern int __clone2(int (*fn) (void *), void *child_stack_base,
                size_t stack_size, int flags, void *arg, ...);
 #define clone2 __clone2
+#elif defined(__metag__)
+#define clone2(func, stack_base, size, flags, arg...) \
+        clone(func, stack_base, flags, arg)
 #else
 #define clone2(func, stack_base, size, flags, arg...) \
         clone(func, (stack_base) + (size), flags, arg)