]> git.lizzy.rs Git - rust.git/blob - src/test/codegen/sanitizer_scs_attr_check.rs
Auto merge of #98553 - the8472:next_chunk_opt, r=Mark-Simulacrum
[rust.git] / src / test / 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: ; Function Attrs:{{.*}}shadowcallstack
11 // CHECK-NEXT: scs
12 pub fn scs() {}
13
14 // CHECK-NOT: ; Function Attrs:{{.*}}shadowcallstack
15 // CHECK-NEXT: no_scs
16 #[no_sanitize(shadow_call_stack)]
17 pub fn no_scs() {}