[cxx-abi-dev] Clarification: behavior of __cxa_vec_delete3

scott douglass scott.douglass at arm.com
Thu Sep 16 13:06:44 UTC 2004


On Wed, 2004-09-15 at 21:42, Mark Mitchell wrote:
> This patch to the specification attempts to clarify the behavior of 
> _cxa_vec_delete3 by clarifying what it means to "delete the space" and 
> also by making it clear that the deallocation function must be called 
> even if the destructor for one of the array elements throws an 
> exception, as required by DR 353.

_cxa_delete2 & __cxa_delete3 both say "If <code>dealloc</code> throws an
exception, the result is undefined."  Does "the result is undefined"
mean "the behavior is undefined"?

Why is this?  If the destructor never throws an exception then I would
expect any exception thrown by the deallocation function to just
propagate.

And, if both the destructor and deallocation function throw, should we
do the normal thing for getting a second exception while cleaning up and
go to std::terminate()?  DR 353 doesn't seem to give any guidance here.



More information about the cxx-abi-dev mailing list