Hi!

On Thu, Nov 11, 2021 at 11:40:10AM -0300, Raphael Moreira Zinsly wrote:
> Changes since v1:
>       - Removed -Wmissing-prototypes fix.
>       - Fixed formatting of Changelog and patch.
> 
> --->8---
> 
> At the end of the backtrace stream _Unwind_Find_FDE() may not be able
> to find the frame unwind info and will later call the backtrace fallback
> instead of finishing. This occurs when using an old libc on ppc64 due to
> dl_iterate_phdr() not being able to set the fde in the last trace.
> When this occurs the cfa of the trace will be behind of context's cfa.
> Also, libgo’s probestackmaps() calls the backtrace with a null pointer
> and can get to the backchain fallback with the same problem, in this case
> we are only interested in find a stack map, we don't need nor can do a
> backchain.
> _Unwind_ForcedUnwind_Phase2() can hit the same issue as it uses
> uw_frame_state_for(), so we need to treat _URC_NORMAL_STOP.
> 
> libgcc/ChangeLog:
> 
>          * config/rs6000/linux-unwind.h (ppc_backchain_fallback): Check if 
> it's
>        called with a null argument or at the end of the backtrace and return.
>          * unwind.inc (_Unwind_ForcedUnwind_Phase2): Treat _URC_NORMAL_STOP.

Committed, thanks!  Please note the changelog formatting fixes I had
to do, for later patches :-)


Segher

Reply via email to