1 // Verifies that AddressSanitizer and MemorySanitizer
2 // recovery mode can be enabled with -Zsanitizer-recover.
4 // needs-sanitizer-support
7 // revisions:ASAN ASAN-RECOVER MSAN MSAN-RECOVER MSAN-RECOVER-LTO
10 //[ASAN] compile-flags: -Zsanitizer=address
11 //[ASAN-RECOVER] compile-flags: -Zsanitizer=address -Zsanitizer-recover=address
12 //[MSAN] compile-flags: -Zsanitizer=memory
13 //[MSAN-RECOVER] compile-flags: -Zsanitizer=memory -Zsanitizer-recover=memory
14 //[MSAN-RECOVER-LTO] compile-flags: -Zsanitizer=memory -Zsanitizer-recover=memory -C lto=fat
16 // MSAN-NOT: @__msan_keep_going
17 // MSAN-RECOVER: @__msan_keep_going = weak_odr {{.*}} constant i32 1
18 // MSAN-RECOVER-LTO: @__msan_keep_going = weak_odr {{.*}} constant i32 1
20 // ASAN-LABEL: define i32 @penguin(
21 // ASAN: call void @__asan_report_load4(i64 %0)
25 // ASAN-RECOVER-LABEL: define i32 @penguin(
26 // ASAN-RECOVER: call void @__asan_report_load4_noabort(
27 // ASAN-RECOVER-NOT: unreachable
30 // MSAN-LABEL: define i32 @penguin(
31 // MSAN: call void @__msan_warning_noreturn()
35 // MSAN-RECOVER-LABEL: define i32 @penguin(
36 // MSAN-RECOVER: call void @__msan_warning()
37 // MSAN-RECOVER-NOT: unreachable
40 // MSAN-RECOVER-LTO-LABEL: define i32 @penguin(
41 // MSAN-RECOVER-LTO: call void @__msan_warning()
42 // MSAN-RECOVER-LTO-NOT: unreachable
43 // MSAN-RECOVER-LTO: }
46 pub fn penguin(p: &mut i32) -> i32 {