[PATCH] [libcxxabi] Cleanup memory in tests to placate ASAN.

Jonathan Roelofs jonathan at codesourcery.com
Tue Nov 18 15:48:50 PST 2014


================
Comment at: test/catch_ptr_02.cpp:141
@@ -139,3 +140,3 @@
     {
-        throw new vDerived;
+        throw &derived;
         assert(false);
----------------
This change looks good to me.

================
Comment at: test/inherited_exception.cpp:59
@@ -58,1 +58,3 @@
+
+
 void f3() {
----------------
Extra whitespace.

================
Comment at: test/inherited_exception.cpp:65
@@ -64,1 +64,3 @@
+  child.c = 12;
+  throw static_cast<Base2*>(&child);
 }
----------------
This change looks good to me.

================
Comment at: test/test_vector1.cpp:218
@@ -217,3 +219,2 @@
         two     = __cxxabiv1::__cxa_vec_new2( 10, 40, 8, throw_construct, throw_destruct, my_alloc2, my_dealloc2 );
-        three   = __cxxabiv1::__cxa_vec_new3( 10, 40, 8, throw_construct, throw_destruct, my_alloc2, my_dealloc3 );
         }
----------------
I may have missed the conversation about this one, but why are you deleting this part of the test?

I don't fee comfortable signing off on the changes in this file as I'm not familiar with __cxa_vec_new*.

http://reviews.llvm.org/D6281






More information about the cfe-commits mailing list