Skip to content

Commit efad8d6

Browse files
committed
sanitizer: Fix scs-attr check test
This test was not actually being run before - it only runs on targets with SCS enabled, which is limited to `aarch64-linux-android` at the moment. This means that the test has been sitting broken and needs to be fixed before we can enable `aarch64-linux-android` in testing. * Rename CHECK function names to match current crate name * Disable optimization to prevent the functions from being made MIR-only
1 parent 3811f40 commit efad8d6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/codegen/sanitizer/scs-attr-check.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,17 @@
33
//
44
//@ needs-sanitizer-shadow-call-stack
55
//@ compile-flags: -Zsanitizer=shadow-call-stack
6+
// With optimization, Rust may decide to make these functions MIR-only.
7+
//@ compile-flags: -C opt-level=0
68

79
#![crate_type = "lib"]
810
#![feature(no_sanitize)]
911

10-
// CHECK: ; sanitizer_scs_attr_check::scs
12+
// CHECK: ; scs_attr_check::scs
1113
// CHECK-NEXT: ; Function Attrs:{{.*}}shadowcallstack
1214
pub fn scs() {}
1315

14-
// CHECK: ; sanitizer_scs_attr_check::no_scs
16+
// CHECK: ; scs_attr_check::no_scs
1517
// CHECK-NOT: ; Function Attrs:{{.*}}shadowcallstack
1618
#[no_sanitize(shadow_call_stack)]
1719
pub fn no_scs() {}

0 commit comments

Comments
 (0)