PATCH: Specify behavior of __cxa_vec_new[23] when dealloc throws
Mark Mitchell
mark at codesourcery.com
Sun May 18 21:32:34 UTC 2003
This patch implements the consensus that __cxa_vec_new[23] should call
std::terminate when dealloc throws an exception.
I've committed this change.
--
Mark Mitchell
CodeSourcery, LLC
mark at codesourcery.com
Index: abi.html
===================================================================
RCS file: /usr/local/Repository/cxx-abi/abi.html,v
retrieving revision 1.65
diff -c -5 -p -r1.65 abi.html
*** abi.html 18 May 2003 21:25:51 -0000 1.65
--- abi.html 18 May 2003 21:30:54 -0000
*************** extern "C" void * __cxa_vec_new2 (
*** 3217,3233 ****
void (*destructor) ( void *this ),
void* (*alloc) ( size_t size ),
void (*dealloc) ( void *obj ) );
</pre></code></dt>
<dd>
! Same as <code>__cxa_vec_new</code>,
! except that the given functions are used for allocation/deallocation
! instead of the default new/delete functions.
! If <code>dealloc</code> throws an exception,
! the result is undefined.
! The <code>alloc</code> and <code>dealloc</code> pointers may not be
! NULL.
</dd>
<dt><code><pre>
extern "C" void * __cxa_vec_new3 (
size_t element_count,
--- 3217,3231 ----
void (*destructor) ( void *this ),
void* (*alloc) ( size_t size ),
void (*dealloc) ( void *obj ) );
</pre></code></dt>
<dd>
! Same as <code>__cxa_vec_new</code>, except that the given functions
! are used for allocation/deallocation instead of the default new/delete
! functions. If <code>dealloc</code> throws an exception,
! <code>std::terminate</code> is called. The <code>alloc</code> and
! <code>dealloc</code> pointers may not be NULL.
</dd>
<dt><code><pre>
extern "C" void * __cxa_vec_new3 (
size_t element_count,
*************** extern "C" void * __cxa_vec_new3 (
*** 3237,3254 ****
void (*destructor) ( void *this ),
void* (*alloc) ( size_t size ),
void (*dealloc) ( void *obj, size_t size ) );
</pre></code></dt>
<dd>
! Same as <code>__cxa_vec_new</code>,
! except that the given functions are used for allocation/deallocation
! instead of the default new/delete functions.
! The deallocation function takes both the object address and its size.
! If <code>dealloc</code> throws an exception,
! the result is undefined.
! The <code>alloc</code> and <code>dealloc</code> pointers may not be
! NULL.
</dd>
<dt><code><pre>
extern "C" void __cxa_vec_ctor (
void *array_address,
--- 3235,3246 ----
void (*destructor) ( void *this ),
void* (*alloc) ( size_t size ),
void (*dealloc) ( void *obj, size_t size ) );
</pre></code></dt>
<dd>
! Same as <code>__cxa_vec_new2</code> except that the deallocation
! function takes both the object address and its size.
</dd>
<dt><code><pre>
extern "C" void __cxa_vec_ctor (
void *array_address,
*************** unwind table location.
*** 4907,4916 ****
--- 4899,4914 ----
<p> <hr> <p>
<a name=revisions>
<h2> Appendix R: Revision History </h2>
<p> <hr> <p>
+
+ <p>
+ <font color=blue>[030518]</font>
+ Specify behavior of <code>__cxa_vec_new2</code> and
+ <code>__cxa_vec_new3</code> when the deallocation function throws an
+ exception.
<p>
<font color=blue>[030518]</font>
Define "POD for the purpose of layout."
More information about the cxx-abi-dev
mailing list