r217064 - Add ubsan/not_ubsan features to Clang lit tests and use

Alexey Samsonov vonosmas at gmail.com
Wed Sep 3 12:46:32 PDT 2014


Author: samsonov
Date: Wed Sep  3 14:46:32 2014
New Revision: 217064

URL: http://llvm.org/viewvc/llvm-project?rev=217064&view=rev
Log:
Add ubsan/not_ubsan features to Clang lit tests and use
them to exclude tests with large stack usage from UBSan bootstrap.

Modified:
    cfe/trunk/test/Index/annotate-deep-statements.cpp
    cfe/trunk/test/Index/index-many-call-ops.cpp
    cfe/trunk/test/Index/index-many-logical-ops.c
    cfe/trunk/test/lit.cfg

Modified: cfe/trunk/test/Index/annotate-deep-statements.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/annotate-deep-statements.cpp?rev=217064&r1=217063&r2=217064&view=diff
==============================================================================
--- cfe/trunk/test/Index/annotate-deep-statements.cpp (original)
+++ cfe/trunk/test/Index/annotate-deep-statements.cpp Wed Sep  3 14:46:32 2014
@@ -3,8 +3,8 @@
 // rdar://11979525
 // Check that we don't get stack overflow trying to annotate an extremely deep AST.
 
-// AddressSanitizer increases stack usage.
-// REQUIRES: not_asan
+// AddressSanitizer and UndefinedBehaviorSanitizer increases stack usage.
+// REQUIRES: not_asan, not_ubsan
 
 struct S {
   S &operator()();

Modified: cfe/trunk/test/Index/index-many-call-ops.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/index-many-call-ops.cpp?rev=217064&r1=217063&r2=217064&view=diff
==============================================================================
--- cfe/trunk/test/Index/index-many-call-ops.cpp (original)
+++ cfe/trunk/test/Index/index-many-call-ops.cpp Wed Sep  3 14:46:32 2014
@@ -4,6 +4,9 @@
 // Check that we don't get stack overflow trying to index a huge number of
 // call operators.
 
+// UBSan increses stack usage.
+// REQUIRES: not_ubsan
+
 struct S {
   S &operator()();
 };

Modified: cfe/trunk/test/Index/index-many-logical-ops.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/index-many-logical-ops.c?rev=217064&r1=217063&r2=217064&view=diff
==============================================================================
--- cfe/trunk/test/Index/index-many-logical-ops.c (original)
+++ cfe/trunk/test/Index/index-many-logical-ops.c Wed Sep  3 14:46:32 2014
@@ -4,6 +4,9 @@
 // Check that we don't get stack overflow trying to index a huge number of
 // logical operators.
 
+// UBSan increses stack usage.
+// REQUIRES: not_ubsan
+
 // CHECK: [indexDeclaration]: kind: function | name: foo
 int foo(int x) {
   return

Modified: cfe/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/lit.cfg?rev=217064&r1=217063&r2=217064&view=diff
==============================================================================
--- cfe/trunk/test/lit.cfg (original)
+++ cfe/trunk/test/lit.cfg Wed Sep  3 14:46:32 2014
@@ -450,6 +450,10 @@ else:
 if (config.llvm_use_sanitizer == "Memory" or
         config.llvm_use_sanitizer == "MemoryWithOrigins"):
     config.available_features.add("msan")
+if config.llvm_use_sanitizer == "Undefined":
+    config.available_features.add("ubsan")
+else:
+    config.available_features.add("not_ubsan")
 
 # Check if we should run long running tests.
 if lit_config.params.get("run_long_tests", None) == "true":





More information about the cfe-commits mailing list