[PATCH] D129991: [sanitizer] Don't always instrument on every lifetime.start

luxufan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 18 02:40:37 PDT 2022


StephenFan created this revision.
StephenFan added a reviewer: vitalybuka.
Herald added subscribers: Enna1, hiraditya.
Herald added a project: All.
StephenFan requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

In D129448 <https://reviews.llvm.org/D129448>, the solution to deal with bypassed variables makes multiple
lifetime start intrinsics for the same alloca object appears in multiple
different basic block. But MemorySanitizer assumes that the variable is
always uninitialized at the place of lifetime.start intrinsic and
instruments poisoning code for it. After D129448 <https://reviews.llvm.org/D129448>, this assumption is broken.

This patch fix the broken assumption by analysis the dominance relation
of lifetime start/end intrinsics.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D129991

Files:
  llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
  llvm/test/Instrumentation/MemorySanitizer/alloca.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129991.445434.patch
Type: text/x-patch
Size: 5111 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220718/50283092/attachment.bin>


More information about the llvm-commits mailing list