From: Alexander Potapenko Date: Thu, 7 Feb 2013 15:55:21 +0000 (+0000) Subject: [ASan] Enable alloc_dealloc_mismatch by default on Darwin. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dc91edad5933e6e073aaa3e716d26625b32f8437;p=platform%2Fupstream%2Fllvm.git [ASan] Enable alloc_dealloc_mismatch by default on Darwin. Enable AddressSanitizer.AllocDeallocMismatch tests. llvm-svn: 174628 --- diff --git a/compiler-rt/lib/asan/asan_rtl.cc b/compiler-rt/lib/asan/asan_rtl.cc index 3d0b9b4..afa838c 100644 --- a/compiler-rt/lib/asan/asan_rtl.cc +++ b/compiler-rt/lib/asan/asan_rtl.cc @@ -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. diff --git a/compiler-rt/lib/asan/tests/asan_test.cc b/compiler-rt/lib/asan/tests/asan_test.cc index 11159c5..f0a119c 100644 --- a/compiler-rt/lib/asan/tests/asan_test.cc +++ b/compiler-rt/lib/asan/tests/asan_test.cc @@ -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; }