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] __cxa_vec_new2 and deallocation functions that throw exceptions


  • To: cxx-abi-dev@xxxxxxxxxxxxxxxx
  • Subject: Re: [cxx-abi-dev] __cxa_vec_new2 and deallocation functions that throw exceptions
  • From: Dennis Handly <dhandly@xxxxxxxxxx>
  • Date: Wed, 14 May 2003 20:27:35 -0700 (PDT)

>The ABI says that, for __cxa_vec_new2 and __cxa_vec_new3:
>  If dealloc throws an exception, the result is undefined.

>I don't understand this restriction.  In particular, the ISO C++
>standard says (if I read it correctly) that:

Please point to the sections where it says this.

>which causes the deallocation function to be called, which
>throws an exception, so terminate is called.)

I see nothing that says this.  Nothing in 15.5.1, (it only talks about
destruction).  And nothing in 15.2 (destructors).  And nothing in
5.3.4(17) either.

>Shouldn't __cxa_vec_new[23] be required to call std::terminate if
>dealloc throws an exception?
Mark Mitchell

It seems it is undefined because the Standard is broken.
Unless there is something I missed?
Destruction and deallocation are different, even if they are combined
in a implementation.

So if we want to change the ABI, we should at least get it spelled out
in the Standard.