[PATCH] D57711: [Sanitizers] UBSan unreachable incompatible with Kernel ASan
Julian Lettner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 4 15:37:44 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rC353120: [Sanitizers] UBSan unreachable incompatible with Kernel ASan (authored by yln, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D57711?vs=185153&id=185178#toc
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57711/new/
https://reviews.llvm.org/D57711
Files:
lib/CodeGen/CGCall.cpp
test/CodeGen/ubsan-asan-noreturn.c
Index: test/CodeGen/ubsan-asan-noreturn.c
===================================================================
--- test/CodeGen/ubsan-asan-noreturn.c
+++ test/CodeGen/ubsan-asan-noreturn.c
@@ -1,6 +1,7 @@
// Ensure compatiblity of UBSan unreachable with ASan in the presence of
// noreturn functions.
-// RUN: %clang_cc1 -fsanitize=unreachable,address -triple x86_64-linux -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -fsanitize=unreachable,address -triple x86_64-linux -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -fsanitize=unreachable,kernel-address -triple x86_64-linux -emit-llvm -o - %s | FileCheck %s
void my_longjmp(void) __attribute__((noreturn));
Index: lib/CodeGen/CGCall.cpp
===================================================================
--- lib/CodeGen/CGCall.cpp
+++ lib/CodeGen/CGCall.cpp
@@ -4403,7 +4403,8 @@
// Avoid incompatibility with ASan which relies on the `noreturn`
// attribute to insert handler calls.
- if (SanOpts.has(SanitizerKind::Address)) {
+ if (SanOpts.hasOneOf(SanitizerKind::Address |
+ SanitizerKind::KernelAddress)) {
SanitizerScope SanScope(this);
llvm::IRBuilder<>::InsertPointGuard IPGuard(Builder);
Builder.SetInsertPoint(CI);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57711.185178.patch
Type: text/x-patch
Size: 1286 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190204/64659e4f/attachment-0001.bin>
More information about the cfe-commits
mailing list