summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/cfi-check-fail.c
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2016-03-15 20:19:29 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2016-03-15 20:19:29 +0000
commit02279ed12d50f78d5a1dc8c6736ad051edb1d69e (patch)
treedbf0eace635aeed256342f2e8407f34b5d700b2b /clang/test/CodeGen/cfi-check-fail.c
parentef156c6701170a3e52cbc710b036b6fb133829bd (diff)
downloadbcm5719-llvm-02279ed12d50f78d5a1dc8c6736ad051edb1d69e.tar.gz
bcm5719-llvm-02279ed12d50f78d5a1dc8c6736ad051edb1d69e.zip
[cfi] Don't emit checks for disabled CFI kinds.
In the cross-DSO CFI mode clang emits __cfi_check_fail that handles errors triggered from other modules with targets in the current module. With this change, __cfi_check_fail will handle errors for CFI kinds that are not enabled in the current module as if they have the trapping behaviour (-fsanitize-trap=...). This fixes a bug where some combinations of -fsanitize* flags may result in a link failure due to a missing sanitizer runtime library for the diagnostic calls in __cfi_check_fail. llvm-svn: 263578
Diffstat (limited to 'clang/test/CodeGen/cfi-check-fail.c')
-rw-r--r--clang/test/CodeGen/cfi-check-fail.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/test/CodeGen/cfi-check-fail.c b/clang/test/CodeGen/cfi-check-fail.c
index e533830a40b..bb89a91b511 100644
--- a/clang/test/CodeGen/cfi-check-fail.c
+++ b/clang/test/CodeGen/cfi-check-fail.c
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux -O0 -fsanitize=cfi-icall -fsanitize-cfi-cross-dso \
+// RUN: %clang_cc1 -triple x86_64-unknown-linux -O0 -fsanitize-cfi-cross-dso \
+// RUN: -fsanitize=cfi-icall,cfi-nvcall,cfi-vcall,cfi-unrelated-cast,cfi-derived-cast \
// RUN: -fsanitize-trap=cfi-icall,cfi-nvcall -fsanitize-recover=cfi-vcall,cfi-unrelated-cast \
// RUN: -emit-llvm -o - %s | FileCheck %s
OpenPOWER on IntegriCloud