[PATCH] Introduce two command-line flags for the instrumentation pass to control whether the labels of pointers should be ignored in load and store instructions
Peter Collingbourne
peter at pcc.me.uk
Fri Nov 15 16:08:51 PST 2013
================
Comment at: lib/Transforms/Instrumentation/DataFlowSanitizer.cpp:522
@@ -507,2 +521,3 @@
if (Function *F = dyn_cast<Function>(DFSanUnionLoadFn)) {
+ F->addAttribute(AttributeSet::FunctionIndex, Attribute::ReadNone);
F->addAttribute(AttributeSet::ReturnIndex, Attribute::ZExt);
----------------
This isn't correct. __dfsan_union_load reads from shadow memory. Maybe you meant "readonly"?
================
Comment at: lib/Transforms/Instrumentation/DataFlowSanitizer.cpp:102
@@ +101,3 @@
+static cl::opt<bool> ClIgnorePointerLabelOnLoad(
+ "dfsan-ignore-pointer-label-on-load",
+ cl::desc("Ignore the label of the pointer when loading data from memory."),
----------------
I'd rather these options not involve a double negative if we want to enable label combining. How about calling them -dfsan-combine-pointer-labels-on-* ?
http://llvm-reviews.chandlerc.com/D2187
More information about the llvm-commits
mailing list