[PATCH] D119614: [HWASAN] use common alignAndPadAlloca
Florian Mayer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 14 14:49:00 PST 2022
fmayer added a comment.
In D119614#3316423 <https://reviews.llvm.org/D119614#3316423>, @fmayer wrote:
> In D119614#3316412 <https://reviews.llvm.org/D119614#3316412>, @fmayer wrote:
>
>> I am also looking whether this code in Aarch64StackTagging needs changing or whether there are different constraints (because HWASAN does more changes to debug intrinsics)
>>
>> // Fixup debug intrinsics to point to the new alloca.
>> for (auto DVI : Info.DbgVariableIntrinsics)
>> DVI->replaceVariableLocationOp(Info.OldAI, Info.AI)
>>
>> If we only use this code for HWASAN, IR regression tests (alloca.ll and dbg-value-tag-offset.ll) fail.
>
> Actually, I need to look more at this now.
I've looked into this. I think it makes sense to allow replacing multiple
================
Comment at: llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp:1382
+ if (memtag::alignAndPadAlloca(Info, Align(Mapping.getObjectAlignment()))) {
+ for (auto DVI : Info.DbgVariableIntrinsics) {
+ size_t N = llvm::count(DVI->location_ops(), AI);
----------------
eugenis wrote:
> Why don't we do the same in AArch64StackTagging?
I am looking into that separately. I also reverted this code to the one we had in HWASan, so we don't do too many changes in one go.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119614/new/
https://reviews.llvm.org/D119614
More information about the llvm-commits
mailing list