]> sourceware.org Git - glibc.git/commit
powerpc: Fix signal handling in backtrace
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 8 May 2017 14:22:20 +0000 (11:22 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 11 May 2017 20:27:31 +0000 (17:27 -0300)
commit31073a53d8ff1e8bac53e34cb626dae5aa6ce69c
tree65aab5e22dcc488f4d17af6fea7cc837f9fe524c
parent488e08b600416ef96d8148fe5239a6387555b1eb
powerpc: Fix signal handling in backtrace

Now with read consolidation which uses SYSCALL_CANCEL macro, a frame
pointer is created in the syscall code and this makes the powerpc
backtrace obtain a bogus entry for the signal handling patch.

It is because it does not setup the correct frame pointer register
(r1) based on the saved value from the kernel sigreturn.  It was not
failing because the syscall frame pointer register was the same one
for the next frame (the function that actually called the syscall).

This patch fixes it by setup the next stack frame using the saved
one by the kernel sigreturn.  It fixes tst-backtrace{5,6} from
the read consolidation patch.

Checked on powerpc-linux-gnu and powerpc64le-linux-gnu.

* sysdeps/powerpc/powerpc32/backtrace.c (is_sigtramp_address): Use
void* for argument type and use VDSO_SYMBOL macro.
(is_sigtramp_address_rt): Likewise.
(__backtrace): Setup expected frame pointer address for signal
handling.
* sysdeps/powerpc/powerpc64/backtrace.c (is_sigtramp_address): Use
void* for argumetn type and use VSDO_SYMBOL macro.
(__backtrace): Setup expected frame pointer address for signal
handling.
ChangeLog
sysdeps/powerpc/powerpc32/backtrace.c
sysdeps/powerpc/powerpc64/backtrace.c
This page took 0.042879 seconds and 5 git commands to generate.