-
Notifications
You must be signed in to change notification settings - Fork 103
Open
Description
The exception handling ABI states:
_URC_END_OF_STACK
: The unwinder encountered the end of the stack during phase 1, without finding a handler. The unwind runtime will not have modified the stack. The C++ runtime will normally calluncaught_exception()
in this case.
But uncaught_exception()
is a pure function, it just returns whether stack unwinding is still in progress or not.
__cxa_throw
from libstdc++:
#ifdef __USING_SJLJ_EXCEPTIONS__
_Unwind_SjLj_RaiseException (&header->exc.unwindHeader);
#else
_Unwind_RaiseException (&header->exc.unwindHeader);
#endif
// Some sort of unwinding error. Note that terminate is a handler.
__cxa_begin_catch (&header->exc.unwindHeader);
std::terminate ();
It unconditionally calls terminate
after marking the exception as caught.
libcxxabi also calls __cxa_begin_catch
followed by terminate
.
Maybe this should just state terminate
instead of uncaught_exception()
? Is the call to __cxa_begin_catch
mandated?
Metadata
Metadata
Assignees
Labels
No labels