diff options
| author | Ding Xiang Fei <dingxiangfei2009@protonmail.ch> | 2024-08-20 23:30:47 +0800 |
|---|---|---|
| committer | Ding Xiang Fei <dingxiangfei2009@protonmail.ch> | 2024-08-29 21:48:48 +0800 |
| commit | 9c29b33c7e6b02acc00965b0816c5cc8b4843e5e (patch) | |
| tree | 16c3e177715e1f451631b9ff5707165b62442f3f /tests/codegen | |
| parent | 6cf068db566de080dfa7ed24a216ea3aed2b98ce (diff) | |
| download | rust-9c29b33c7e6b02acc00965b0816c5cc8b4843e5e.tar.gz rust-9c29b33c7e6b02acc00965b0816c5cc8b4843e5e.zip | |
riscv64imac: allow shadow call stack sanitizer
Diffstat (limited to 'tests/codegen')
| -rw-r--r-- | tests/codegen/sanitizer/riscv64-shadow-call-stack.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/codegen/sanitizer/riscv64-shadow-call-stack.rs b/tests/codegen/sanitizer/riscv64-shadow-call-stack.rs new file mode 100644 index 00000000000..5833b832ba4 --- /dev/null +++ b/tests/codegen/sanitizer/riscv64-shadow-call-stack.rs @@ -0,0 +1,17 @@ +//@ compile-flags: --target riscv64imac-unknown-none-elf -Zsanitizer=shadow-call-stack +//@ needs-llvm-components: riscv + +#![allow(internal_features)] +#![crate_type = "rlib"] +#![feature(no_core, lang_items)] +#![no_core] + +#[lang = "sized"] +trait Sized {} + +// CHECK: ; Function Attrs:{{.*}}shadowcallstack +// CHECK: define dso_local void @foo() unnamed_addr #0 +#[no_mangle] +pub fn foo() {} + +// CHECK: attributes #0 = {{.*}}shadowcallstack{{.*}} |
