This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 8/8] powerpc: Fix signal handling in backtrace


Adhemerval Zanella <adhemerval.zanella@linaro.org> writes:

> 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} after
> 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/powerpc32/backtrace.c (is_sigtramp_address): Use

The files are duplicated in the ChangeLog.

Looks good to me with that fix as soon as patch #4 is integrated.

Thanks!

-- 
Tulio Magno


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]