[PATCH] D98268: [dfsan] Tracking origins at phi nodes
Matt Morehouse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 9 11:43:35 PST 2021
morehouse added a comment.
Can we add an end-to-end test as well?
================
Comment at: llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp:1572-1575
+ for (std::vector<DFSanFunction::PHIFixupElement>::iterator
+ I = DFSF.PHIFixups.begin(),
+ E = DFSF.PHIFixups.end();
+ I != E; ++I) {
----------------
Nit: range for loop is cleaner if we don't need to advance iterators ourselves.
================
Comment at: llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp:2716
+ }
+
Value *RawDestShadow = DFSF.DFS.getShadowAddress(I.getDest(), &I);
----------------
This is unrelated and shouldn't be in this diff...
================
Comment at: llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp:3144-3145
+ Value *UndefOrigin = UndefValue::get(DFSF.DFS.OriginTy);
+ for (PHINode::block_iterator i = PN.block_begin(), e = PN.block_end();
+ i != e; ++i) {
+ OriginPN->addIncoming(UndefOrigin, *i);
----------------
Nit: range for loop is cleaner
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98268/new/
https://reviews.llvm.org/D98268
More information about the llvm-commits
mailing list