]> git.lizzy.rs Git - rust.git/blob - tests/codegen/sanitizer_scs_attr_check.rs
Auto merge of #107778 - weihanglo:update-cargo, r=weihanglo
[rust.git] / tests / codegen / sanitizer_scs_attr_check.rs
1 // This tests that the shadowcallstack attribute is
2 // applied when enabling the shadow-call-stack sanitizer.
3 //
4 // needs-sanitizer-shadow-call-stack
5 // compile-flags: -Zsanitizer=shadow-call-stack
6
7 #![crate_type = "lib"]
8 #![feature(no_sanitize)]
9
10 // CHECK: ; sanitizer_scs_attr_check::scs
11 // CHECK-NEXT: ; Function Attrs:{{.*}}shadowcallstack
12 pub fn scs() {}
13
14 // CHECK: ; sanitizer_scs_attr_check::no_scs
15 // CHECK-NOT: ; Function Attrs:{{.*}}shadowcallstack
16 #[no_sanitize(shadow_call_stack)]
17 pub fn no_scs() {}