Skip to content

Commit 749f556

Browse files
committed
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
1 parent 6abd78c commit 749f556

File tree

1 file changed

+1
-1
lines changed
  • compiler-rt/test/hwasan/TestCases

1 file changed

+1
-1
lines changed

compiler-rt/test/hwasan/TestCases/cfi.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_hwasan -fsanitize=cfi -fno-sanitize-trap=cfi -flto -fvisibility=hidden -fuse-ld=lld %s -o %t
1+
// RUN: %clangxx_hwasan -fsanitize=cfi -fno-sanitize-trap=cfi -flto -fvisibility=hidden -fuse-ld=lld %s -o %t
22
// RUN: not %run %t 2>&1 | FileCheck %s
33

44
// REQUIRES: android

0 commit comments

Comments
 (0)