Hi danalbert, mclow.lists, jroelofs,

ASAN fires on these tests because they don't clean up their memory.

http://reviews.llvm.org/D6281

Files:
  test/catch_ptr_02.cpp
  test/inherited_exception.cpp
  test/test_vector1.cpp
Index: test/catch_ptr_02.cpp
===================================================================
--- test/catch_ptr_02.cpp
+++ test/catch_ptr_02.cpp
@@ -142,6 +142,8 @@
     }
     catch (vBase *p) {
         assert(p != 0);
+        // NOTE: delete needed to placate ASAN.
+        delete p;
     }
     catch (...)
     {
Index: test/inherited_exception.cpp
===================================================================
--- test/inherited_exception.cpp
+++ test/inherited_exception.cpp
@@ -157,6 +157,8 @@
     catch (const Base2* c)
     {
         assert(true);
+        // NOTE: delete needed to placate ASAN.
+        delete static_cast<Child*>(const_cast<Base2*>(c));
     }
     catch (...)
     {
Index: test/test_vector1.cpp
===================================================================
--- test/test_vector1.cpp
+++ test/test_vector1.cpp
@@ -234,6 +234,8 @@
                 gDestructorCounter << ")" << std::endl;
         retVal = 1;
         }
+// Delete "three" to placate ASAN.
+    __cxxabiv1::__cxa_vec_delete3(three, 40, 8, my_destruct, my_dealloc3);
 
 //  Try throwing from a destructor - should be fine.
     gConstructorCounter = gDestructorCounter = 0;
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to