[ Date Prev][ Date Next][ Thread Prev][ Thread Next][ Date Index][ Thread Index]
Re: [cxx-abi-dev] One-time Construction API (3.3.2)
- To: Dennis Handly <dhandly@xxxxxxxxxx>
- Subject: Re: [cxx-abi-dev] One-time Construction API (3.3.2)
- From: Jason Merrill <jason@xxxxxxxxxx>
- Date: Fri, 06 Aug 2004 10:52:20 -0400
On Fri, 6 Aug 2004 02:14:42 -0700 (PDT), Dennis Handly <dhandly@xxxxxxxxxx> wrote:
>>From: Jason Merrill <jason@xxxxxxxxxx>
>>> 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
|