Index: compiler-rt/lib/asan/asan_flags.inc =================================================================== --- compiler-rt/lib/asan/asan_flags.inc +++ compiler-rt/lib/asan/asan_flags.inc @@ -152,8 +152,6 @@ ASAN_FLAG(bool, halt_on_error, true, "Crash the program after printing the first error report " "(WARNING: USE AT YOUR OWN RISK!)") -ASAN_FLAG(bool, use_odr_indicator, false, - "Use special ODR indicator symbol for ODR violation detection") ASAN_FLAG(bool, allocator_frees_and_returns_null_on_realloc_zero, true, "realloc(p, 0) is equivalent to free(p) by default (Same as the " "POSIX standard). If set to false, realloc(p, 0) will return a " Index: compiler-rt/lib/asan/asan_globals.cc =================================================================== --- compiler-rt/lib/asan/asan_globals.cc +++ compiler-rt/lib/asan/asan_globals.cc @@ -183,9 +183,7 @@ // This routine chooses between two different methods of ODR violation // detection. static inline bool UseODRIndicator(const Global *g) { - // Use ODR indicator method iff use_odr_indicator flag is set and - // indicator symbol address is not 0. - return flags()->use_odr_indicator && g->odr_indicator > 0; + return g->odr_indicator > 0; } // Register a global variable. Index: compiler-rt/test/asan/TestCases/Darwin/odr-lto.cc =================================================================== --- compiler-rt/test/asan/TestCases/Darwin/odr-lto.cc +++ compiler-rt/test/asan/TestCases/Darwin/odr-lto.cc @@ -1,4 +1,4 @@ -// Check that -asan-use-private-alias and use_odr_indicator=1 silence the false +// Check that -asan-use-private-alias silence the false // positive ODR violation on Darwin with LTO. // REQUIRES: lto @@ -6,7 +6,7 @@ // RUN: %clangxx_asan -DPART=0 -c %s -o %t-1.o -flto -mllvm -asan-use-private-alias // RUN: %clangxx_asan -DPART=1 -c %s -o %t-2.o -flto -mllvm -asan-use-private-alias // RUN: %clangxx_asan %t-1.o %t-2.o -o %t -flto -// RUN: %env_asan_opts=use_odr_indicator=1 %run %t 2>&1 | FileCheck %s +// RUN: %run %t 2>&1 | FileCheck %s #include #include Index: compiler-rt/test/asan/TestCases/Linux/local_alias.cc =================================================================== --- compiler-rt/test/asan/TestCases/Linux/local_alias.cc +++ compiler-rt/test/asan/TestCases/Linux/local_alias.cc @@ -11,7 +11,7 @@ // RUN: %clangxx -DBUILD_UNINSTRUMENTED_DSO=1 -fPIC -shared %s -o %t-UNINSTRUMENTED-SO.so // RUN: %clangxx %s -c -mllvm -asan-use-private-alias -o %t.o // RUN: %clangxx_asan %t.o %t-UNINSTRUMENTED-SO.so %t-INSTRUMENTED-SO.so -o %t-EXE -// RUN: %env_asan_opts=use_odr_indicator=true %run %t-EXE +// RUN: %run %t-EXE #if defined (BUILD_INSTRUMENTED_DSO) long h = 15; Index: compiler-rt/test/asan/TestCases/Linux/odr-violation.cc =================================================================== --- compiler-rt/test/asan/TestCases/Linux/odr-violation.cc +++ compiler-rt/test/asan/TestCases/Linux/odr-violation.cc @@ -26,9 +26,7 @@ // Use private aliases for global variables: use indicator symbol to detect ODR violation. // RUN: %clangxx_asan -DBUILD_SO=1 -fPIC -shared -mllvm -asan-use-private-alias %s -o %t-ODR-SO.so -DSZ=100 // RUN: %clangxx_asan -mllvm -asan-use-private-alias %s %t-ODR-SO.so -Wl,-R. -o %t-ODR-EXE -// RUN: %env_asan_opts=fast_unwind_on_malloc=0 %run %t-ODR-EXE 2>&1 | FileCheck %s --check-prefix=DISABLED -// RUN: %env_asan_opts=fast_unwind_on_malloc=0:use_odr_indicator=false %run %t-ODR-EXE 2>&1 | FileCheck %s --check-prefix=DISABLED -// RUN: %env_asan_opts=fast_unwind_on_malloc=0:use_odr_indicator=true not %run %t-ODR-EXE 2>&1 | FileCheck %s +// RUN: %env_asan_opts=fast_unwind_on_malloc=0 not %run %t-ODR-EXE 2>&1 | FileCheck %s // GNU driver doesn't handle .so files properly. // REQUIRES: Clang