[asan] enable detect_odr_violation=2; https://code.google.com/p/address-sanitizer...
authorKostya Serebryany <kcc@google.com>
Tue, 3 Jun 2014 15:06:13 +0000 (15:06 +0000)
committerKostya Serebryany <kcc@google.com>
Tue, 3 Jun 2014 15:06:13 +0000 (15:06 +0000)
llvm-svn: 210106

compiler-rt/lib/asan/asan_rtl.cc
compiler-rt/test/asan/TestCases/Linux/odr-violation.cc

index 3e21c87..2fe91f2 100644 (file)
@@ -279,6 +279,7 @@ void InitializeFlags(Flags *f, const char *env) {
   f->start_deactivated = false;
   f->detect_invalid_pointer_pairs = 0;
   f->detect_container_overflow = true;
+  f->detect_odr_violation = 2;
 
   // Override from compile definition.
   ParseFlagsFromString(f, MaybeUseAsanDefaultOptionsCompileDefinition());
index a5fa289..c496c24 100644 (file)
@@ -7,12 +7,13 @@
 // RUN: ASAN_OPTIONS=detect_odr_violation=1 not %run %t 2>&1 | FileCheck %s
 // RUN: ASAN_OPTIONS=detect_odr_violation=2 not %run %t 2>&1 | FileCheck %s
 // RUN: ASAN_OPTIONS=detect_odr_violation=0     %run %t 2>&1 | FileCheck %s --check-prefix=DISABLED
-// RUN:                                         %run %t 2>&1 | FileCheck %s --check-prefix=DISABLED
+// RUN:                                     not %run %t 2>&1 | FileCheck %s
 //
 // Same size: report a bug only if detect_odr_violation>=2.
 // RUN: %clangxx_asan -DBUILD_SO=1 -fPIC -shared %s -o %t.so -DSZ=100
 // RUN: ASAN_OPTIONS=detect_odr_violation=1     %run %t 2>&1 | FileCheck %s --check-prefix=DISABLED
 // RUN: ASAN_OPTIONS=detect_odr_violation=2 not %run %t 2>&1 | FileCheck %s
+// RUN:                                     not %run %t 2>&1 | FileCheck %s
 
 // GNU driver doesn't handle .so files properly.
 // REQUIRES: Clang