summaryrefslogtreecommitdiff
path: root/test/ubsan
diff options
context:
space:
mode:
authorRobert Lougher <rob.lougher@gmail.com>2016-10-26 16:02:36 +0000
committerRobert Lougher <rob.lougher@gmail.com>2016-10-26 16:02:36 +0000
commit34e89ba88dbd702beea62bb80138079295955369 (patch)
treed0498f7298ef2289db98dd73ebec663fefc6dfdb /test/ubsan
parent96ea1686d9241e2d6d473d3aba9ac120f5ae0c2c (diff)
[ubsan] Fix vptr.cpp test to be more resilient. NFC.
The test contains a switch statement in which two of the cases are tail-merged, with the call to __ubsan_handle_dynamic_type_cache_miss_abort in the common tail. When tail-merging occurs, the debug location of the tail is randomly taken from one of the merge inputs. Luckily for the test, the expected line number in the check is the one which is chosen by the tail-merge. However, if the switch cases are re-ordered the test will fail. This patch disables tail-merge, making the test resilient to changes in tail-merge, and unblocking review D25742. It does not change the semantics of the test. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@285208 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/ubsan')
-rw-r--r--test/ubsan/TestCases/TypeCheck/vptr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ubsan/TestCases/TypeCheck/vptr.cpp b/test/ubsan/TestCases/TypeCheck/vptr.cpp
index 62fb4ed08..53a79c9fc 100644
--- a/test/ubsan/TestCases/TypeCheck/vptr.cpp
+++ b/test/ubsan/TestCases/TypeCheck/vptr.cpp
@@ -1,4 +1,4 @@
-// RUN: %clangxx -frtti -fsanitize=vptr -fno-sanitize-recover=vptr -g %s -O3 -o %t
+// RUN: %clangxx -frtti -fsanitize=vptr -fno-sanitize-recover=vptr -g %s -O3 -o %t -mllvm -enable-tail-merge=false
// RUN: %run %t rT && %run %t mT && %run %t fT && %run %t cT
// RUN: %run %t rU && %run %t mU && %run %t fU && %run %t cU
// RUN: %run %t rS && %run %t rV && %run %t oV