libgo: fix ptrace syscall hooks into glibc
ptrace is actually declared as a variadic function. On ppc64le
the ABI requires to the caller to allocate space for the parameters
and allows the caller to modify them.
On ppc64le, depending on how and what version of GCC is used,
it will save to parameter save area. This happened to clobber
a saved LR, and caused syscall.TestExecPtrace to fail with a timeout
when the tracee segfaults, and waits for the parent process to inspect.
Wrap this function to avoid directly calling glibc's ptrace from go.
Trust: Lynn Boger <firstname.lastname@example.org>
Reviewed-by: Ian Lance Taylor <email@example.com>
3 files changed