Actions

icon Post
text/html Subscribe
text/html Unsubscribe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: "cxx-abi-dev@xxxxxxxxxxxxxxxx" <cxx-abi-dev@xxxxxxxxxxxxxxxx>
  • Subject: Re: [cxx-abi-dev] Clarification: behavior of __cxa_vec_delete3
  • From: scott douglass <scott.douglass@xxxxxxx>
  • Date: Thu, 16 Sep 2004 14:06:44 +0100

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.