Add ShadowCallStack Support
Adds support for the LLVM ShadowCallStack sanitizer.
This commit is contained in:
parent
a289cfcfb3
commit
adf61e3b2b
14 changed files with 57 additions and 4 deletions
|
@ -69,6 +69,9 @@ pub fn sanitize_attrs<'ll>(
|
|||
if enabled.contains(SanitizerSet::HWADDRESS) {
|
||||
attrs.push(llvm::AttributeKind::SanitizeHWAddress.create_attr(cx.llcx));
|
||||
}
|
||||
if enabled.contains(SanitizerSet::SHADOWCALLSTACK) {
|
||||
attrs.push(llvm::AttributeKind::ShadowCallStack.create_attr(cx.llcx));
|
||||
}
|
||||
if enabled.contains(SanitizerSet::MEMTAG) {
|
||||
// Check to make sure the mte target feature is actually enabled.
|
||||
let features = cx.tcx.global_backend_features(());
|
||||
|
|
|
@ -192,6 +192,7 @@ pub enum AttributeKind {
|
|||
NoUndef = 33,
|
||||
SanitizeMemTag = 34,
|
||||
NoCfCheck = 35,
|
||||
ShadowCallStack = 36,
|
||||
}
|
||||
|
||||
/// LLVMIntPredicate
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue