[PATCH] D83337: [MSAN] Instrument libatomic load/store calls

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 20 21:16:29 PDT 2020


eugenis accepted this revision.
eugenis added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:3559
+                                                   kMinOriginAlignment);
+      Value *NewOrigin = updateOrigin(SrcOrigin, NextIRB);
+      NextIRB.CreateCall(MS.MsanSetOriginFn, {DstPtr, Size, NewOrigin});
----------------
guiand wrote:
> eugenis wrote:
> > Why not storeOrigin? It even has an option to use a runtime helper, a better one (conditional).
> Since this function isn't necessarily called with a constant size, I needed some way to set the origin for a variable-sized region too. It seems like `storeOrigin` and the maybe-store functions use constant sizes?
Oh, right. OK, this should be good enough.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83337





More information about the llvm-commits mailing list