Add ubsan/not_ubsan features to Clang lit tests and use

them to exclude tests with large stack usage from UBSan bootstrap.

llvm-svn: 217064
This commit is contained in:
Alexey Samsonov 2014-09-03 19:46:32 +00:00
parent bfc6b954ac
commit 3205b51673
4 changed files with 12 additions and 2 deletions

View File

@ -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()();

View File

@ -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()();
};

View File

@ -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

View File

@ -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":