[PATCH] D83337: [MSAN] Instrument libatomic load/store calls
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 17 11:15:09 PDT 2020
eugenis added inline comments.
================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:3531
+ void visitLibAtomicLoad(CallBase &CB) {
+ IRBuilder<> IRB(&CB);
----------------
Check that the arguments are initialized (see ClCheckAccessAddress).
================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:3559
+ kMinOriginAlignment);
+ Value *NewOrigin = updateOrigin(SrcOrigin, NextIRB);
+ NextIRB.CreateCall(MS.MsanSetOriginFn, {DstPtr, Size, NewOrigin});
----------------
Why not storeOrigin? It even has an option to use a runtime helper, a better one (conditional).
================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:3585
+ Value *SrcOrigin = getCleanOrigin();
+ IRB.CreateCall(MS.MsanSetOriginFn, {DstPtr, Size, SrcOrigin});
+ }
----------------
Origin is meaningless when the shadow is 0.
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