summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2019-07-17 23:35:15 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2019-07-17 23:35:15 +0000
commit47487fe5640d61713096e02d4255595179500d6c (patch)
treec252790936908da0fee53c06228e4632b723a051
parente12315901803f289670a6a0713c60ac9ad2056e5 (diff)
downloadcompiler-rt-47487fe5640d61713096e02d4255595179500d6c.tar.gz
hwasan: Use C++ driver for cfi.cc test.
It turns out that this test was only passing by accident. It was relying on the optimizer to remove the only reference to A's vtable by realizing that the CFI check will always fail. The vtable contains a reference to RTTI in libc++, which will be unresolved because the C driver won't link against it. This was found by my prototype implementation of HWASAN for globals, which happens to end up preserving the reference. Differential Revision: https://reviews.llvm.org/D64890 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@366389 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/hwasan/TestCases/cfi.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/hwasan/TestCases/cfi.cc b/test/hwasan/TestCases/cfi.cc
index 457e29659..e64b55617 100644
--- a/test/hwasan/TestCases/cfi.cc
+++ b/test/hwasan/TestCases/cfi.cc
@@ -1,4 +1,4 @@
-// RUN: %clang_hwasan -fsanitize=cfi -fno-sanitize-trap=cfi -flto -fvisibility=hidden -fuse-ld=lld %s -o %t
+// RUN: %clangxx_hwasan -fsanitize=cfi -fno-sanitize-trap=cfi -flto -fvisibility=hidden -fuse-ld=lld %s -o %t
// RUN: not %run %t 2>&1 | FileCheck %s
// REQUIRES: android