]> granicus.if.org Git - llvm/commitdiff
[Sanitizers] UBSan unreachable incompatible with Kernel ASan
authorJulian Lettner <jlettner@apple.com>
Mon, 4 Feb 2019 23:37:50 +0000 (23:37 +0000)
committerJulian Lettner <jlettner@apple.com>
Mon, 4 Feb 2019 23:37:50 +0000 (23:37 +0000)
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353120 91177308-0d34-0410-b5e6-96231b3b80d8

test/Instrumentation/AddressSanitizer/instrument-no-return.ll

index 0df85c710a4ea3463e0c8e5e290d2c1c63ba7d82..22ee66301de25f5b0b1a4826aca6904596509726 100644 (file)
@@ -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*) {