[llvm] r353120 - [Sanitizers] UBSan unreachable incompatible with Kernel ASan

Julian Lettner via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 4 15:37:50 PST 2019


Author: yln
Date: Mon Feb  4 15:37:50 2019
New Revision: 353120

URL: http://llvm.org/viewvc/llvm-project?rev=353120&view=rev
Log:
[Sanitizers] UBSan unreachable incompatible with Kernel ASan

Summary:
This is a follow up for https://reviews.llvm.org/D57278. The previous
revision should have also included Kernel ASan.

rdar://problem/40723397

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D57711

Modified:
    llvm/trunk/test/Instrumentation/AddressSanitizer/instrument-no-return.ll

Modified: llvm/trunk/test/Instrumentation/AddressSanitizer/instrument-no-return.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Instrumentation/AddressSanitizer/instrument-no-return.ll?rev=353120&r1=353119&r2=353120&view=diff
==============================================================================
--- llvm/trunk/test/Instrumentation/AddressSanitizer/instrument-no-return.ll (original)
+++ llvm/trunk/test/Instrumentation/AddressSanitizer/instrument-no-return.ll Mon Feb  4 15:37:50 2019
@@ -35,6 +35,15 @@ define i32 @Call3() sanitize_address {
 ; CHECK-NOT:    call void @__asan_handle_no_return
 ; CHECK:        call void @NoReturnFunc
 
+; Do *not* instrument functions without ASan
+define i32 @Call4() {
+  call void @NoReturnFunc() noreturn
+  unreachable
+}
+; CHECK-LABEL:  @Call4
+; CHECK-NOT:    call void @__asan_handle_no_return
+; CHECK:        call void @NoReturnFunc
+
 declare i32 @__gxx_personality_v0(...)
 
 define i64 @Invoke1() nounwind uwtable ssp sanitize_address personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {




More information about the llvm-commits mailing list