eh interface questions

Richard Henderson rth at redhat.com
Mon Feb 26 21:51:07 UTC 2001


On Mon, Feb 26, 2001 at 10:53:03AM -0700, DE-DINECHIN,CHRISTOPHE wrote:
> *	_URC_FATAL_PHASE1_ERROR = 3: The personality routine encountered an
> error during phase 1, other than the specific error codes defined. 
> 
> *	_URC_FATAL_PHASE2_ERROR = 2: The personality routine encountered an
> error during phase 2, for instance a stack corruption. 
> 
> For a C++ runtime, for instance, reason codes 2 and 3 should result in
> "terminate()" being called. Reason code 1 should not.

As I understood things, _URC_FATAL_PHASE1_ERROR is returned from 
_Unwind_RaiseException to __cxa_throw, which then calls terminate
directly.  Under what circumstances would generic code delete the
exception here instead?

I could perhaps see _Unwind_Resume invoking this with
_URC_FATAL_PHASE2_ERROR, since there's no one to whom we could
return an error condition.  But I find it mildly unlikely that
any sort of real phase2 error will ever be preemptively detected
instead of the program just crashing.

> GP is also stored in the UnwindContext as register GR1.

Ouch.  I missed that.  I presume this is the only register modified
by the unwinder (as opposed to the personality routine) outside the
ones properly described by .IA_64.unwind_info?  Are you also assuming
that R1 is restored by _URC_INSTALL_CONTEXT, and that the landing pad
needn't bother?

I guess I'll have to invent some other solution for non-ia64, since
this information is not available via PT_DYNAMIC elsewhere.


r~




More information about the cxx-abi-dev mailing list