[cxx-abi-dev] ABI modification for exception propagation

Dennis Handly dhandly at cup.hp.com
Sat May 31 05:21:28 UTC 2008


>From: Sebastian Redl <sebastian.redl at getdesigned.at>
>__cxa_end_catch has modified behaviour:
>* It locates the most recently caught exception and decrements its handler
>count.

This now has to be atomic since threaded, right?
Or is this still local to the thread but the next is atomic?

>* If the handler count goes down to zero, and the exception was not
>re-thrown by throw, it locates the primary exception (which may be the
>same as the one it's handling) and decrements its reference count.

Ok, this needs to be atomic.

>2.7 Exception Propagation
>exception_ptr is a smart pointer.  Its only member is a pointer to a
>primary exception.  It uses this exception's reference count,
>incrementing upon taking ownership and decrementing and potentially
>destroying upon releasing it.

And this would need to be atomic?

>std::rethrow_exception() shall call __cxa_allocate_dependent_exception()
>and make it reference the primary exception pointed to by the
>exception_ptr.  It shall increment the reference count of the primary
>exception.

Again atomic?



More information about the cxx-abi-dev mailing list