[cxx-abi-dev] __cxa_vec_new2 and deallocation functions that throw exceptions

Dennis Handly dhandly at cup.hp.com
Thu May 15 03:27:35 UTC 2003


>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.



More information about the cxx-abi-dev mailing list