[PATCH] D105201: [hwasan] Detect use after scope within function.
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 15 19:43:40 PDT 2021
eugenis added inline comments.
================
Comment at: llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp:1350
+ }
+ if (!StandardLifetime) {
+ for (auto &II : Info.LifetimeStart)
----------------
vitalybuka wrote:
> can we avoid removing them? it can break other optimizations.
> I guess the goal is to avoid them in tagLifetimeEnd, but recalculating them in StandardLifetime there is cheap.
We can't. Tagging before/after lifetime is UB - consider that this memory may be reused for another alloca with different tag value.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105201/new/
https://reviews.llvm.org/D105201
More information about the llvm-commits
mailing list