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

Jonathan Roelofs jonathan at codesourcery.com
Tue Nov 18 16:23:26 PST 2014

Comment at: test/test_vector1.cpp:231
@@ -229,2 +230,3 @@
 //  We should have thrown in the middle of cleaning up "two", which means that
 //  there should be 20 calls to the destructor, and "three" was not cleaned up.
+    if ( gConstructorCounter != 20 || gDestructorCounter != 20 ) {
This comment lies if you end up going though with the change.

Is there a way to tell asan that we expect a leak here? Based on this comment, I think leaking is part of the expected behavior of the test. @mclow.lists what do you think?


More information about the cfe-commits mailing list