[PATCH] D92261: [dfsan] Track field/index-level shadow values in variables
stephan.yichao.zhao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 9 09:49:32 PST 2020
stephan.yichao.zhao added inline comments.
================
Comment at: llvm/test/Instrumentation/DataFlowSanitizer/array.ll:245
+ ; FAST16: [[E:%.*]] = extractvalue [17 x i16] {{.*}}, 16
+ ; FAST16: [[S:%.*]] = or i16 {{.*}}, [[E]]
+ ; FAST16: [[V1:%.*]] = insertelement <8 x i16> undef, i16 [[S]], i32 0
----------------
morehouse wrote:
> stephan.yichao.zhao wrote:
> > morehouse wrote:
> > > Shouldn't there be more ORs for each element in `%a`?
> > This is where the current diff loses accuracy.
> > When saving an aggregate value into memory, we call that collapse function to convert an accurate shadow to a i16 label.
> > So this diff only increases accuracy for variables, arguments and ret.
> >
> > This works for O1-compiled targets, because alloca premotion removes lots of memory operations, and practice code does not save aggregate types to memory.
> > If we build by O0, it does not work as those pair.cc and struct.c test.
> >
> > We need to address this in the next change.
> So there *should* be more ORs in the current diff, right? But the plan is to fix this, so that's why they aren't listed here?
added.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92261/new/
https://reviews.llvm.org/D92261
More information about the llvm-commits
mailing list