[PATCH] D89191: [ASAN] Make sure we are only processing lifetime markers with offset 0 to alloca
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 13 23:01:34 PDT 2020
vitalybuka added inline comments.
================
Comment at: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp:1083
+ // beginning of the alloca.
+ AllocaInst *AI = findAllocaForValue(II.getArgOperand(1), true);
if (!AI) {
----------------
lxfind wrote:
> lxfind wrote:
> > vitalybuka wrote:
> > > Similar problem is if the size of lifetime is smaller then alloca.
> > > Would you like to handle that case, here or in the another patch?
> > Is that a problem though? A lifetime marker should always be accurate, that is, if the marker indicates that only part of the region is alive, it should be ok to just mark that region alive?
> I will land this as it is for now. But please do let me know your thoughts on what we want to do when the size doesn't match.
if marker can point with offset, skipping the beginning of the alloca, then I assume sooner or later something may generate code which will set size smaller then alloca, skipping the tail of it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89191/new/
https://reviews.llvm.org/D89191
More information about the llvm-commits
mailing list