019d75b44e
Adds support for LLVM [SafeStack] which provides backward edge control flow protection by separating the stack into two parts: data which is only accessed in provable safe ways is allocated on the normal stack (the "safe stack") and all other data is placed in a separate allocation (the "unsafe stack"). SafeStack support is enabled by passing `-Zsanitizer=safestack`. [SafeStack]: https://clang.llvm.org/docs/SafeStack.html
12 lines
296 B
Rust
12 lines
296 B
Rust
// This tests that the safestack attribute is applied when enabling the safe-stack sanitizer.
|
|
//
|
|
// needs-sanitizer-safestack
|
|
// compile-flags: -Zsanitizer=safestack
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
// CHECK: ; Function Attrs:{{.*}}safestack
|
|
pub fn tagged() {}
|
|
|
|
// CHECK: attributes #0 = {{.*}}safestack
|