Wrong wording in 1.3 "Throwing an exception."

Christophe de Dinechin ddd at cup.hp.com
Thu Sep 21 00:31:05 UTC 2000


The current wording doesn't match the C++ standard:

> If the unwinder encounters an unexpected error during phase 2,
> the unwind runtime may have modified the stack, e.g. popped
> frames from it, or landing pad code may have caused stack corruption.
> As a result, the unwind library probably could not find a return address,
> and the caller of _Unwind_RaiseException could make no assumptions about
> the state of its stack. Rather than attempt to return, therefore, the unwind
> library should use the exception_cleanup entry in the exception,
> and then call abort(). 

What C++ mandates in that case is calling terminate(), not abort(), and that's a
decision that only the C++ runtime can make (it may be different for other
languages).

What's more, the justification doesn't apply very well on IA-64. There is only
one return address for _RaiseException, and it is not on the stack but in a
local register (br0). Therefore, _RaiseException has very good chances of being
able to return to the C++ runtime, and from there, we move only downwards in the
calls tack (terminate() which typically calls abort() itself).

So the paragraph above should indicate that we return _URC_FATAL_PHASE2_ERROR.


Thanks,
Christophe




More information about the cxx-abi-dev mailing list