[compiler-rt] r210924 - Remove top-level Clang -fsanitize= flags for optional ASan features.

Alexey Samsonov vonosmas at gmail.com
Fri Jun 13 10:53:45 PDT 2014


Author: samsonov
Date: Fri Jun 13 12:53:44 2014
New Revision: 210924

URL: http://llvm.org/viewvc/llvm-project?rev=210924&view=rev
Log:
Remove top-level Clang -fsanitize= flags for optional ASan features.

Init-order and use-after-return modes can currently be enabled
by runtime flags. use-after-scope mode is not really working at the
moment.

The only problem I see is that users won't be able to disable extra
instrumentation for init-order and use-after-scope by a top-level Clang flag.
But this instrumentation was implicitly enabled for quite a while and
we didn't hear from users hurt by it.

Modified:
    compiler-rt/trunk/test/asan/TestCases/initialization-blacklist.cc
    compiler-rt/trunk/test/asan/TestCases/initialization-constexpr.cc
    compiler-rt/trunk/test/asan/TestCases/initialization-nobug.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope-dtor-order.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope-inlined.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope-nobug.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope.cc

Modified: compiler-rt/trunk/test/asan/TestCases/initialization-blacklist.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/initialization-blacklist.cc?rev=210924&r1=210923&r2=210924&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/initialization-blacklist.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/initialization-blacklist.cc Fri Jun 13 12:53:44 2014
@@ -2,18 +2,15 @@
 
 // RUN: %clangxx_asan -O0 %s %p/Helpers/initialization-blacklist-extra.cc\
 // RUN:   %p/Helpers/initialization-blacklist-extra2.cc \
-// RUN:   -fsanitize-blacklist=%p/Helpers/initialization-blacklist.txt \
-// RUN:   -fsanitize=init-order -o %t
+// RUN:   -fsanitize-blacklist=%p/Helpers/initialization-blacklist.txt -o %t
 // RUN: env ASAN_OPTIONS=check_initialization_order=true %run %t 2>&1
 // RUN: %clangxx_asan -O1 %s %p/Helpers/initialization-blacklist-extra.cc\
 // RUN:   %p/Helpers/initialization-blacklist-extra2.cc \
-// RUN:   -fsanitize-blacklist=%p/Helpers/initialization-blacklist.txt \
-// RUN:   -fsanitize=init-order -o %t
+// RUN:   -fsanitize-blacklist=%p/Helpers/initialization-blacklist.txt -o %t
 // RUN: env ASAN_OPTIONS=check_initialization_order=true %run %t 2>&1
 // RUN: %clangxx_asan -O2 %s %p/Helpers/initialization-blacklist-extra.cc\
 // RUN:   %p/Helpers/initialization-blacklist-extra2.cc \
-// RUN:   -fsanitize-blacklist=%p/Helpers/initialization-blacklist.txt \
-// RUN:   -fsanitize=init-order -o %t
+// RUN:   -fsanitize-blacklist=%p/Helpers/initialization-blacklist.txt -o %t
 // RUN: env ASAN_OPTIONS=check_initialization_order=true %run %t 2>&1
 
 // Function is defined in another TU.

Modified: compiler-rt/trunk/test/asan/TestCases/initialization-constexpr.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/initialization-constexpr.cc?rev=210924&r1=210923&r2=210924&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/initialization-constexpr.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/initialization-constexpr.cc Fri Jun 13 12:53:44 2014
@@ -4,17 +4,13 @@
 // constructor implies that it was initialized during constant initialization,
 // not dynamic initialization).
 
-// RUN: %clangxx_asan -O0 %s %p/Helpers/initialization-constexpr-extra.cc\
-// RUN:   --std=c++11 -fsanitize=init-order -o %t
+// RUN: %clangxx_asan -O0 %s %p/Helpers/initialization-constexpr-extra.cc --std=c++11 -o %t
 // RUN: env ASAN_OPTIONS=check_initialization_order=true %run %t 2>&1
-// RUN: %clangxx_asan -O1 %s %p/Helpers/initialization-constexpr-extra.cc\
-// RUN:   --std=c++11 -fsanitize=init-order -o %t
+// RUN: %clangxx_asan -O1 %s %p/Helpers/initialization-constexpr-extra.cc --std=c++11 -o %t
 // RUN: env ASAN_OPTIONS=check_initialization_order=true %run %t 2>&1
-// RUN: %clangxx_asan -O2 %s %p/Helpers/initialization-constexpr-extra.cc\
-// RUN:   --std=c++11 -fsanitize=init-order -o %t
+// RUN: %clangxx_asan -O2 %s %p/Helpers/initialization-constexpr-extra.cc --std=c++11 -o %t
 // RUN: env ASAN_OPTIONS=check_initialization_order=true %run %t 2>&1
-// RUN: %clangxx_asan -O3 %s %p/Helpers/initialization-constexpr-extra.cc\
-// RUN:   --std=c++11 -fsanitize=init-order -o %t
+// RUN: %clangxx_asan -O3 %s %p/Helpers/initialization-constexpr-extra.cc --std=c++11 -o %t
 // RUN: env ASAN_OPTIONS=check_initialization_order=true %run %t 2>&1
 
 class Integer {

Modified: compiler-rt/trunk/test/asan/TestCases/initialization-nobug.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/initialization-nobug.cc?rev=210924&r1=210923&r2=210924&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/initialization-nobug.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/initialization-nobug.cc Fri Jun 13 12:53:44 2014
@@ -1,13 +1,13 @@
 // A collection of various initializers which shouldn't trip up initialization
 // order checking.  If successful, this will just return 0.
 
-// RUN: %clangxx_asan -O0 %s %p/Helpers/initialization-nobug-extra.cc -fsanitize=init-order -o %t
+// RUN: %clangxx_asan -O0 %s %p/Helpers/initialization-nobug-extra.cc -o %t
 // RUN: env ASAN_OPTIONS=check_initialization_order=true %run %t 2>&1
-// RUN: %clangxx_asan -O1 %s %p/Helpers/initialization-nobug-extra.cc -fsanitize=init-order -o %t
+// RUN: %clangxx_asan -O1 %s %p/Helpers/initialization-nobug-extra.cc -o %t
 // RUN: env ASAN_OPTIONS=check_initialization_order=true %run %t 2>&1
-// RUN: %clangxx_asan -O2 %s %p/Helpers/initialization-nobug-extra.cc -fsanitize=init-order -o %t
+// RUN: %clangxx_asan -O2 %s %p/Helpers/initialization-nobug-extra.cc -o %t
 // RUN: env ASAN_OPTIONS=check_initialization_order=true %run %t 2>&1
-// RUN: %clangxx_asan -O3 %s %p/Helpers/initialization-nobug-extra.cc -fsanitize=init-order -o %t
+// RUN: %clangxx_asan -O3 %s %p/Helpers/initialization-nobug-extra.cc -o %t
 // RUN: env ASAN_OPTIONS=check_initialization_order=true %run %t 2>&1
 
 // Simple access:

Modified: compiler-rt/trunk/test/asan/TestCases/use-after-scope-dtor-order.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-scope-dtor-order.cc?rev=210924&r1=210923&r2=210924&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-scope-dtor-order.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-scope-dtor-order.cc Fri Jun 13 12:53:44 2014
@@ -1,5 +1,6 @@
 // RUN: %clangxx_asan -O0 -fsanitize=use-after-scope %s -o %t && \
 // RUN:     not %run %t 2>&1 | FileCheck %s
+// XFAIL: *
 #include <stdio.h>
 
 struct IntHolder {

Modified: compiler-rt/trunk/test/asan/TestCases/use-after-scope-inlined.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-scope-inlined.cc?rev=210924&r1=210923&r2=210924&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-scope-inlined.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-scope-inlined.cc Fri Jun 13 12:53:44 2014
@@ -3,6 +3,7 @@
 // llvm.lifetime intrinsics at -O0.
 //
 // RUN: %clangxx_asan -O2 -fsanitize=use-after-scope %s -o %t && not %run %t 2>&1 | FileCheck %s
+// XFAIL: *
 
 int *arr;
 

Modified: compiler-rt/trunk/test/asan/TestCases/use-after-scope-nobug.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-scope-nobug.cc?rev=210924&r1=210923&r2=210924&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-scope-nobug.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-scope-nobug.cc Fri Jun 13 12:53:44 2014
@@ -1,4 +1,5 @@
 // RUN: %clangxx_asan -O0 -fsanitize=use-after-scope %s -o %t && %run %t
+// XFAIL: *
 
 #include <stdio.h>
 

Modified: compiler-rt/trunk/test/asan/TestCases/use-after-scope.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-scope.cc?rev=210924&r1=210923&r2=210924&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-scope.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-scope.cc Fri Jun 13 12:53:44 2014
@@ -1,6 +1,7 @@
 // RUN: %clangxx_asan -O0 -fsanitize=use-after-scope %s -o %t && \
 // RUN: not %run %t 2>&1 | FileCheck %s
 // RUN: env ASAN_OPTIONS="detect_stack_use_after_return=1" not %run %t 2>&1 | FileCheck %s
+// XFAIL: *
 
 int main() {
   int *p = 0;





More information about the llvm-commits mailing list