[PATCH] D127544: Add no_sanitize('hwaddress') (and 'memtag', but that's a no-op).
Hubert Tong via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 24 14:22:24 PDT 2022
hubert.reinterpretcast added a comment.
>From the content of this patch, it probably is `llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp`:
switch (TargetTriple.getArch()) {
case Triple::x86_64:
// The signal handler will find the data address in rdi.
Asm = InlineAsm::get(
FunctionType::get(IRB.getVoidTy(), {PtrLong->getType()}, false),
"int3\nnopl " +
itostr(0x40 + (AccessInfo & HWASanAccessInfo::RuntimeMask)) +
"(%rax)",
"{rdi}",
/*hasSideEffects=*/true);
break;
case Triple::aarch64:
case Triple::aarch64_be:
// The signal handler will find the data address in x0.
Asm = InlineAsm::get(
FunctionType::get(IRB.getVoidTy(), {PtrLong->getType()}, false),
"brk #" + itostr(0x900 + (AccessInfo & HWASanAccessInfo::RuntimeMask)),
"{x0}",
/*hasSideEffects=*/true);
break;
default:
report_fatal_error("unsupported architecture");
}
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127544/new/
https://reviews.llvm.org/D127544
More information about the cfe-commits
mailing list