-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
unconditionally allow shadow call-stack for AArch64 whenever fixed-x1…
…8 is applied
- Loading branch information
1 parent
8c7e0e1
commit b368dcb
Showing
6 changed files
with
55 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
tests/codegen/sanitizer/aarch64-shadow-call-stack-with-fixed-x18.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
//@ revisions: aarch64 android | ||
//@[aarch64] compile-flags: --target aarch64-unknown-none -Zfixed-x18 -Zsanitizer=shadow-call-stack | ||
//@[aarch64] needs-llvm-components: aarch64 | ||
//@[android] compile-flags: --target aarch64-linux-android -Zsanitizer=shadow-call-stack | ||
//@[android] needs-llvm-components: aarch64 | ||
|
||
#![allow(internal_features)] | ||
#![crate_type = "rlib"] | ||
#![feature(no_core, lang_items)] | ||
#![no_core] | ||
|
||
#[lang = "sized"] | ||
trait Sized {} | ||
|
||
// CHECK: ; Function Attrs:{{.*}}shadowcallstack | ||
#[no_mangle] | ||
pub fn foo() {} | ||
|
||
// CHECK: attributes #0 = {{.*}}shadowcallstack{{.*}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
//@ compile-flags: --target aarch64-unknown-none -Zsanitizer=shadow-call-stack | ||
//@ error-pattern: shadow-call-stack sanitizer is not supported for this target | ||
//@ dont-check-compiler-stderr | ||
//@ needs-llvm-components: aarch64 | ||
|
||
#![allow(internal_features)] | ||
#![crate_type = "rlib"] | ||
#![feature(no_core, lang_items)] | ||
#![no_core] | ||
|
||
#[lang = "sized"] | ||
trait Sized {} | ||
|
||
#[no_mangle] | ||
pub fn foo() {} |