[ASan] Enable alloc_dealloc_mismatch by default on Darwin.

Enable AddressSanitizer.AllocDeallocMismatch tests.

llvm-svn: 174628
This commit is contained in:
Alexander Potapenko 2013-02-07 15:55:21 +00:00
parent ed9eae90d4
commit dc91edad59
2 changed files with 2 additions and 5 deletions

View File

@ -147,9 +147,7 @@ void InitializeFlags(Flags *f, const char *env) {
f->fast_unwind_on_fatal = false; f->fast_unwind_on_fatal = false;
f->fast_unwind_on_malloc = true; f->fast_unwind_on_malloc = true;
f->poison_heap = true; f->poison_heap = true;
// Turn off alloc/dealloc mismatch checker on Mac for now. f->alloc_dealloc_mismatch = true;
// TODO(glider): Fix known issues and enable this back.
f->alloc_dealloc_mismatch = (ASAN_MAC == 0);
f->use_stack_depot = true; // Only affects allocator2. f->use_stack_depot = true; // Only affects allocator2.
// Override from user-specified string. // Override from user-specified string.

View File

@ -1110,9 +1110,8 @@ TEST(AddressSanitizer, AttributeNoAddressSafetyTest) {
Ident(NoAddressSafety)(); Ident(NoAddressSafety)();
} }
// TODO(glider): Enable this test on Mac.
// It doesn't work on Android, as calls to new/delete go through malloc/free. // 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) { static string MismatchStr(const string &str) {
return string("AddressSanitizer: alloc-dealloc-mismatch \\(") + str; return string("AddressSanitizer: alloc-dealloc-mismatch \\(") + str;
} }