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);
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);
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits