[PATCH] D91236: Extend the dfsan store/load callback with write/read address
stephan.yichao.zhao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 12 11:59:49 PST 2020
stephan.yichao.zhao marked 2 inline comments as done.
stephan.yichao.zhao added inline comments.
================
Comment at: llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp:1480
IRBuilder<> IRB(&SI);
- IRB.CreateCall(DFSF.DFS.DFSanStoreCallbackFn, Shadow);
+ Type *Int8Ptr = Type::getInt8PtrTy(*DFSF.DFS.Ctx);
+ Value *Addr8 = IRB.CreateBitCast(SI.getPointerOperand(), Int8Ptr);
----------------
morehouse wrote:
> stephan.yichao.zhao wrote:
> > morehouse wrote:
> > > Let's reuse the `Int8Ptr` member variable.
> > That one is defined in DataFlowSanitizer.
> Yes let's use it.
Done. Sorry. I did not realize DFSF is a struct, so all members are public.
================
Comment at: llvm/test/Instrumentation/DataFlowSanitizer/callback.ll:6
+define i8 @load8(i8* %p) {
+ ; CHECK: call void @__dfsan_load_callback(i16 %11)
+ ; CHECK: %a = load i8, i8* %p
----------------
morehouse wrote:
> morehouse wrote:
> > The variable numbers in this test seem potentially brittle. Can we avoid matching against them?
> All the other ones too. Look at the other tests in this directory. They avoid specifying variable numbers since those can easily change.
replaced by regex.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91236/new/
https://reviews.llvm.org/D91236
More information about the llvm-commits
mailing list