1
Fork 0

Add ShadowCallStack Support

Adds support for the LLVM ShadowCallStack sanitizer.
This commit is contained in:
Ivan Lozano 2022-06-17 14:14:58 -04:00
parent a289cfcfb3
commit adf61e3b2b
14 changed files with 57 additions and 4 deletions

View file

@ -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(());