summaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-25 03:57:20 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-25 03:57:20 +0000
commit57811700d42143f211f94f83de8806a537e2a16a (patch)
treea1321c242570af678195bae067b31b4c26c4980e /libstdc++-v3
parenta969c5b30cab33dc8ea8bfdfd14639e43e9b3c80 (diff)
downloadgcc-57811700d42143f211f94f83de8806a537e2a16a.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150073 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog6
-rw-r--r--libstdc++-v3/libsupc++/vec.cc8
2 files changed, 12 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index a89a4a6830a..21f67c5d670 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,9 @@
+2009-07-24 Jason Merrill <jason@redhat.com>
+
+ Core issue 901
+ * libsupc++/vec.cc (__cxa_vec_new2, __cxa_vec_new3): Handle NULL
+ dealloc.
+
2009-07-24 Joseph Myers <joseph@codesourcery.com>
* include/c_global/cwchar (swprintf, vswprintf): Do not use if
diff --git a/libstdc++-v3/libsupc++/vec.cc b/libstdc++-v3/libsupc++/vec.cc
index f1322896d0b..e44a023049e 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;
}