From 34e89ba88dbd702beea62bb80138079295955369 Mon Sep 17 00:00:00 2001 From: Robert Lougher Date: Wed, 26 Oct 2016 16:02:36 +0000 Subject: [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 --- test/ubsan/TestCases/TypeCheck/vptr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/ubsan') 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 -- cgit v1.2.3