Deallocators and Exceptions

Jeffrey D. Oldham oldham at codesourcery.com
Tue Aug 22 21:45:34 UTC 2000


In the draft C++ ABI for IA-64, \S 3.3.3, __cxa_vec_new2 (), what is
required if dealloc () throws an exception?

I see three possibilities:

1. The C++ standard prohibits deallocators from throwing exceptions.
   (I could not find such a requirement.)

2. Make the result undefined as what happens when a destructor throws
   an exception.  (See __cxa_new_vec ().)

3. Require calling std::terminate () because we cannot guarantee
   memory will be left in a coherent state.

Thanks for the information,
Jeffrey D. Oldham
oldham at codesourcery.com




More information about the cxx-abi-dev mailing list