[PATCH] D146208: [ASAN] Support memory checks on vp.load/store.

Yeting Kuo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 25 05:49:58 PDT 2023


fakepaper56 planned changes to this revision.
fakepaper56 added inline comments.


================
Comment at: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp:1478
+      EVL = IB.CreateZExt(EVL, IntptrTy);
+    End = IB.CreateBinaryIntrinsic(Intrinsic::umin, EVL, End);
+  }
----------------
reames wrote:
> I don't believe there's anything preventing AVL from being 0 here right?  If so, this code is wrong.  The routine you're calling has a (documented!) assumption that End > 0.  To reuse, you need to add the loop guard and remove that assumption.
Thank you for pointing my mistake. I am not positive to remove End > 0 assumption from `SplitBlockAndInsertSimpleForLoop` because it is used in MemorySanitizerVisitor::paintOrigin and there should not a loop guard to test End.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146208/new/

https://reviews.llvm.org/D146208



More information about the llvm-commits mailing list