diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:18:27 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:18:27 +0000 |
commit | 316d58822dada9440bd06ecfc758dcc2364d617c (patch) | |
tree | fe72ec2e6ce9a360dda74d9d57f7acdb0e3c39d6 /test/cfi/simple-fail.cpp | |
parent | 0230fcf22fe7d19f03d981c9c2c59a3db0b72ea5 (diff) |
Notes
Diffstat (limited to 'test/cfi/simple-fail.cpp')
-rw-r--r-- | test/cfi/simple-fail.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/cfi/simple-fail.cpp b/test/cfi/simple-fail.cpp index 92b1322718f89..595ca1617a02a 100644 --- a/test/cfi/simple-fail.cpp +++ b/test/cfi/simple-fail.cpp @@ -52,6 +52,9 @@ // RUN: %clangxx -o %t18 %s // RUN: %t18 2>&1 | FileCheck --check-prefix=NCFI %s +// RUN: %clangxx_cfi -DCHECK_NO_SANITIZE_CFI -o %t19 %s +// RUN: %t19 2>&1 | FileCheck --check-prefix=NCFI %s + // Tests that the CFI mechanism crashes the program when making a virtual call // to an object of the wrong class but with a compatible vtable, by casting a // pointer to such an object and attempting to make a call through it. @@ -73,6 +76,9 @@ struct B { void B::f() {} +#if defined(CHECK_NO_SANITIZE_CFI) +__attribute__((no_sanitize("cfi"))) +#endif int main() { create_derivers<B>(); |