This is an archive of the discontinued LLVM Phabricator instance.

[dfsan] Rename ShadowTy/ZeroShadow with prefix Primitive
ClosedPublic

Authored by stephan.yichao.zhao on Dec 1 2020, 10:01 PM.

Details

Summary
This is a child diff of D92261.

After supporting field/index-level shadow, the existing shadow with type
i16 works for only primitive types.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptDec 1 2020, 10:01 PM
stephan.yichao.zhao requested review of this revision.Dec 1 2020, 10:01 PM

What is a "primary" type? Maybe we can pick a more descriptive name, or at least write a comment somewhere in the code explaining the difference between primary and not primary types/shadows.

stephan.yichao.zhao retitled this revision from [dfsan] Rename ShadowTy/ZeroShadow with prefix Primary to [dfsan] Rename ShadowTy/ZeroShadow with prefix Primitive.Dec 2 2020, 10:55 AM
stephan.yichao.zhao edited the summary of this revision. (Show Details)
stephan.yichao.zhao retitled this revision from [dfsan] Rename ShadowTy/ZeroShadow with prefix Primitive to [dfsan] Rename ShadowTy/ZeroShadow with prefix Primary.
stephan.yichao.zhao edited the summary of this revision. (Show Details)

Sorry. This was a typo.

renamed Primary to Primitive

In D92261, values with primitive types like(i1, double, void*) have i16 shadow values,
and aggregate types have shadow values with i16 shadow values at leaves with primitive
types. Vectors should have non-primitive shadow values too, but at an incrementally
implementation, D92261 still assignes i16 to vectors.

The comments around PrimitiveShadowTy will be updated in the following diffs.

morehouse accepted this revision.Dec 2 2020, 2:31 PM
morehouse added inline comments.
llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
357–362
365

I think this comment is unnecessary since the previous comment explains enough.

This revision is now accepted and ready to land.Dec 2 2020, 2:31 PM
morehouse retitled this revision from [dfsan] Rename ShadowTy/ZeroShadow with prefix Primary to [dfsan] Rename ShadowTy/ZeroShadow with prefix Primitive.Dec 2 2020, 2:32 PM
morehouse edited the summary of this revision. (Show Details)
stephan.yichao.zhao marked 2 inline comments as done.Dec 2 2020, 2:50 PM
This revision was landed with ongoing or failed builds.Dec 2 2020, 9:32 PM
This revision was automatically updated to reflect the committed changes.