[compiler-rt] r174628 - [ASan] Enable alloc_dealloc_mismatch by default on Darwin.

Alexander Potapenko glider at google.com
Thu Feb 7 07:55:21 PST 2013


Author: glider
Date: Thu Feb  7 09:55:21 2013
New Revision: 174628

URL: http://llvm.org/viewvc/llvm-project?rev=174628&view=rev
Log:
[ASan] Enable alloc_dealloc_mismatch by default on Darwin.
Enable AddressSanitizer.AllocDeallocMismatch tests.

Modified:
    compiler-rt/trunk/lib/asan/asan_rtl.cc
    compiler-rt/trunk/lib/asan/tests/asan_test.cc

Modified: compiler-rt/trunk/lib/asan/asan_rtl.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_rtl.cc?rev=174628&r1=174627&r2=174628&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_rtl.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_rtl.cc Thu Feb  7 09:55:21 2013
@@ -147,9 +147,7 @@ void InitializeFlags(Flags *f, const cha
   f->fast_unwind_on_fatal = false;
   f->fast_unwind_on_malloc = true;
   f->poison_heap = true;
-  // Turn off alloc/dealloc mismatch checker on Mac for now.
-  // TODO(glider): Fix known issues and enable this back.
-  f->alloc_dealloc_mismatch = (ASAN_MAC == 0);
+  f->alloc_dealloc_mismatch = true;
   f->use_stack_depot = true;  // Only affects allocator2.
 
   // Override from user-specified string.

Modified: compiler-rt/trunk/lib/asan/tests/asan_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_test.cc?rev=174628&r1=174627&r2=174628&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_test.cc (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_test.cc Thu Feb  7 09:55:21 2013
@@ -1110,9 +1110,8 @@ TEST(AddressSanitizer, AttributeNoAddres
   Ident(NoAddressSafety)();
 }
 
-// TODO(glider): Enable this test on Mac.
 // It doesn't work on Android, as calls to new/delete go through malloc/free.
-#if !defined(__APPLE__) && !defined(ANDROID) && !defined(__ANDROID__)
+#if !defined(ANDROID) && !defined(__ANDROID__)
 static string MismatchStr(const string &str) {
   return string("AddressSanitizer: alloc-dealloc-mismatch \\(") + str;
 }





More information about the llvm-commits mailing list