[PATCH] D122787: [DFSan] Add dfsan-combine-taint-lookup-table option as work around for false negatives when dfsan-combine-pointer-labels-on-load=0 and dfsan-combine-offset-labels-on-gep=0 miss data flows through lookup tables.

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 5 10:17:30 PDT 2022


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

description title is unusually long



================
Comment at: llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp:803
+
+  for (StringRef v : ClCombineTaintLookupTables) {
+    CombineTaintLookupTableNames.insert(v);
----------------
drop {}
and the rest of the patch


================
Comment at: llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp:1851
 
+bool DFSanFunction::isLookupTableConstant(Value *P) {
+  if (GlobalVariable *GV = dyn_cast<GlobalVariable>(P->stripPointerCasts())) {
----------------
in llvm code we usually omit {} on simple cases like this 


================
Comment at: llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp:2113
 
+Value *StripPointerGEPsAndCasts(Value *V) {
+  if (!V->getType()->isPointerTy())
----------------
V->stripPointerCasts() ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122787



More information about the llvm-commits mailing list