diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2024-08-29 16:21:47 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-29 16:21:47 +0200 |
| commit | a65404aba42fde1063d3f11f8cb4db0b8c20fce3 (patch) | |
| tree | cb28829b5a1d656dafb47744f9ef4156a7531be3 /tests | |
| parent | d5c40d03dc0c31ac099992d1692003a130f4073d (diff) | |
| parent | 9c29b33c7e6b02acc00965b0816c5cc8b4843e5e (diff) | |
| download | rust-a65404aba42fde1063d3f11f8cb4db0b8c20fce3.tar.gz rust-a65404aba42fde1063d3f11f8cb4db0b8c20fce3.zip | |
Rollup merge of #129316 - dingxiangfei2009:riscv64-imac-scs, r=nnethercote
riscv64imac: allow shadow call stack sanitizer cc `@Darksonn` for shadow call stack sanitizer support on RV64IMAC and RV64GC
Diffstat (limited to 'tests')
| -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{{.*}} |
