1
Fork 0

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
This commit is contained in:
Guillaume Gomez 2024-08-29 16:21:47 +02:00 committed by GitHub
commit a65404aba4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 52 additions and 9 deletions

View file

@ -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{{.*}}