diff options
author | James Hogan <james.hogan@imgtec.com> | 2013-05-01 13:16:50 +0100 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2013-05-01 14:55:54 +0000 |
commit | 554e6f3240bcd6110214685371745278b43a8ab7 (patch) | |
tree | a08e9aa790dc448315552b6dfee5e5f4a7dad090 /test | |
parent | 5cf23c53b8a96269ef72b6d675c811c8132ae5ec (diff) | |
download | strace-554e6f3240bcd6110214685371745278b43a8ab7.tar.gz strace-554e6f3240bcd6110214685371745278b43a8ab7.tar.bz2 strace-554e6f3240bcd6110214685371745278b43a8ab7.tar.xz |
test/threaded_execve: fix on metag
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>
Diffstat (limited to 'test')
-rw-r--r-- | test/threaded_execve.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/threaded_execve.c b/test/threaded_execve.c index 628589a..4c21688 100644 --- a/test/threaded_execve.c +++ b/test/threaded_execve.c @@ -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) |