2022-06-17 13:14:58 -05:00
|
|
|
// This tests that the shadowcallstack attribute is
|
|
|
|
// applied when enabling the shadow-call-stack sanitizer.
|
|
|
|
//
|
|
|
|
// needs-sanitizer-shadow-call-stack
|
|
|
|
// compile-flags: -Zsanitizer=shadow-call-stack
|
|
|
|
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
#![feature(no_sanitize)]
|
|
|
|
|
2022-10-05 23:46:44 -05:00
|
|
|
// CHECK: ; sanitizer_scs_attr_check::scs
|
|
|
|
// CHECK-NEXT: ; Function Attrs:{{.*}}shadowcallstack
|
2022-06-17 13:14:58 -05:00
|
|
|
pub fn scs() {}
|
|
|
|
|
2022-10-05 23:46:44 -05:00
|
|
|
// CHECK: ; sanitizer_scs_attr_check::no_scs
|
2022-06-17 13:14:58 -05:00
|
|
|
// CHECK-NOT: ; Function Attrs:{{.*}}shadowcallstack
|
|
|
|
#[no_sanitize(shadow_call_stack)]
|
|
|
|
pub fn no_scs() {}
|