diff options
author | Jason Merrill <jason@redhat.com> | 2009-07-24 23:57:20 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2009-07-24 23:57:20 -0400 |
commit | 67a6e8167985001be8a50485a8cd8a0d0355a363 (patch) | |
tree | a1321c242570af678195bae067b31b4c26c4980e /libstdc++-v3/libsupc++ | |
parent | 05b5c4e8742e5deba247f5a68eec43b13e88ce8c (diff) | |
download | gcc-67a6e8167985001be8a50485a8cd8a0d0355a363.zip gcc-67a6e8167985001be8a50485a8cd8a0d0355a363.tar.gz gcc-67a6e8167985001be8a50485a8cd8a0d0355a363.tar.bz2 |
Core issue 901
Core issue 901
* libsupc++/vec.cc (__cxa_vec_new2, __cxa_vec_new3): Handle NULL
dealloc.
* call.c (build_op_delete_call): If this is for a new-expression
and the op delete is deleted, do nothing.
From-SVN: r150073
Diffstat (limited to 'libstdc++-v3/libsupc++')
-rw-r--r-- | libstdc++-v3/libsupc++/vec.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libstdc++-v3/libsupc++/vec.cc b/libstdc++-v3/libsupc++/vec.cc index f132289..e44a023 100644 --- a/libstdc++-v3/libsupc++/vec.cc +++ b/libstdc++-v3/libsupc++/vec.cc @@ -104,7 +104,10 @@ namespace __cxxabiv1 { { uncatch_exception ue; - dealloc(base - padding_size); + // Core issue 901 will probably be resolved such that a + // deleted operator delete means not freeing memory here. + if (dealloc) + dealloc(base - padding_size); } __throw_exception_again; } @@ -142,7 +145,8 @@ namespace __cxxabiv1 { { uncatch_exception ue; - dealloc(base - padding_size, size); + if (dealloc) + dealloc(base - padding_size, size); } __throw_exception_again; } |