[PATCH] D60617: MSan: handle llvm.lifetime.start intrinsic
Alexander Potapenko via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 26 03:46:45 PDT 2019
glider marked 2 inline comments as done.
glider added inline comments.
================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:2573
+ if (AllocaSet.count(AI))
+ AllocaSet.erase(AI);
+ LifetimeStartList.push_back(std::make_pair(&I, AI));
----------------
eugenis wrote:
> What if AllocaInst is visited after all of its lifetime.start calls? I'm not 100% that this is impossible, and then this code will poison both allocainst and lifetime.start.
>
> IMHO, the visitor should simply collect allocas and lifetimes, and then the finalization code can erase allocas as it instruments their lifetime.starts.
>
You're right, we'd better not over-complicate the collection logic.
I however doubt a lifetime intrinsic can occur before an alloca, because it's using that alloca's result.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60617/new/
https://reviews.llvm.org/D60617
More information about the llvm-commits
mailing list