[ASan] Enable alloc_dealloc_mismatch by default on Darwin.
authorAlexander Potapenko <glider@google.com>
Thu, 7 Feb 2013 15:55:21 +0000 (15:55 +0000)
committerAlexander Potapenko <glider@google.com>
Thu, 7 Feb 2013 15:55:21 +0000 (15:55 +0000)
Enable AddressSanitizer.AllocDeallocMismatch tests.

llvm-svn: 174628

compiler-rt/lib/asan/asan_rtl.cc
compiler-rt/lib/asan/tests/asan_test.cc

index 3d0b9b4..afa838c 100644 (file)
@@ -147,9 +147,7 @@ void InitializeFlags(Flags *f, const char *env) {
   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.
index 11159c5..f0a119c 100644 (file)
@@ -1110,9 +1110,8 @@ TEST(AddressSanitizer, AttributeNoAddressSafetyTest) {
   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;
 }