[cxx-abi-dev] One-time Construction API (3.3.2)
Jason Merrill
jason at redhat.com
Fri Aug 6 14:52:20 UTC 2004
On Fri, 6 Aug 2004 02:14:42 -0700 (PDT), Dennis Handly <dhandly at cup.hp.com> wrote:
>>From: Jason Merrill <jason at redhat.com>
>>> we seem to do the same for both. And it is left on the atexit list
>>> for the latter.
>
>>Doing the same for both is wrong, I think; once construction of the object
>>is complete, it's complete, whether or not the subsequent cleanup throws.
>
> I guess we could reduce the size of the catch to not include the cleanup.
If cleanup throws, you need to call __cxa_guard_release, so it also needs
to be in the throw path somehow. Which is how I came to the code I posted
earlier.
>>> We do use the second byte to handle (stop) recursion.
>
> In undefined case where the code to initialize the function scope static
> recursively calls the current function.
Ah, makes sense.
Jason
More information about the cxx-abi-dev
mailing list