diff options
| author | Peter Collingbourne <peter@pcc.me.uk> | 2019-07-17 23:35:15 +0000 | 
|---|---|---|
| committer | Peter Collingbourne <peter@pcc.me.uk> | 2019-07-17 23:35:15 +0000 | 
| commit | 749f556bbd146f1bf066a994e7a9a9fdc65ab6a1 (patch) | |
| tree | 304656487aac32671e5c1b4cb3f82def27f9e00c | |
| parent | 6abd78cc7c97356c1f6e9bf65b19ef3c9cc0f6b9 (diff) | |
| download | bcm5719-llvm-749f556bbd146f1bf066a994e7a9a9fdc65ab6a1.tar.gz bcm5719-llvm-749f556bbd146f1bf066a994e7a9a9fdc65ab6a1.zip  | |
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
llvm-svn: 366389
| -rw-r--r-- | compiler-rt/test/hwasan/TestCases/cfi.cc | 2 | 
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler-rt/test/hwasan/TestCases/cfi.cc b/compiler-rt/test/hwasan/TestCases/cfi.cc index 457e29659e7..e64b556171e 100644 --- a/compiler-rt/test/hwasan/TestCases/cfi.cc +++ b/compiler-rt/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  | 

