This is the mail archive of the
mailing list for the GCC project.
Re: TPF unwinding broken
- From: Richard Henderson <rth at redhat dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 11 May 2012 08:36:54 -0700
- Subject: Re: TPF unwinding broken
- References: <201205100015.q4A0Fhpn022611@greed.delorie.com>
On 05/09/12 17:15, DJ Delorie wrote:
> A TPF stack frame has up to two return addresses in it. The second
> one is used when the call crosses a shared object domain, where a stub
> is between the two functions. The stub does not change the stack, but
> it does eventually chain to the "correct" return address.
> In the TPF unwinder, a fallback handler is provided that traps these
> stub addresses, updates the RA in the frame data, and returns. The
> next iteration of the unwinding loop sees the "right" RA.
> However, the CFA is used to "uniquely identify" a call frame. Since
> the same CFA has two RAs, it is no longer unique, and the assert in
> _Unwind_RaiseException_Phase2() is triggered.
> Removing the assert makes everything work just fine, since the next
> iteration of the loop finds the correct personality etc.
> In the past, the RA was used to uniquely identify the frame, which
> also worked for TPF.
> Any ideas on how to work around this "bug" in the tpf-specific files?
Can any of these stubs throw exceptions? What are they used for?
My first reaction is to simply consider them invisible system frames
and ignore them when it comes to unwinding...