Add kernel-address
sanitizer support for freestanding targets
This commit is contained in:
parent
0416b1a6f6
commit
19714385e0
18 changed files with 142 additions and 12 deletions
|
@ -62,7 +62,7 @@ pub fn sanitize_attrs<'ll>(
|
|||
) -> SmallVec<[&'ll Attribute; 4]> {
|
||||
let mut attrs = SmallVec::new();
|
||||
let enabled = cx.tcx.sess.opts.unstable_opts.sanitizer - no_sanitize;
|
||||
if enabled.contains(SanitizerSet::ADDRESS) {
|
||||
if enabled.contains(SanitizerSet::ADDRESS) || enabled.contains(SanitizerSet::KERNELADDRESS) {
|
||||
attrs.push(llvm::AttributeKind::SanitizeAddress.create_attr(cx.llcx));
|
||||
}
|
||||
if enabled.contains(SanitizerSet::MEMORY) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue