This is an archive of the discontinued LLVM Phabricator instance.

Add the ShadowCallStack attribute
ClosedPublic

Authored by vlad.tsyrklevich on Mar 22 2018, 12:44 PM.

Details

Summary

Introduce the ShadowCallStack function attribute. It's added to
functions compiled with -fsanitize=shadow-call-stack in order to mark
functions to be instrumented by a ShadowCallStack pass to be submitted
in a separate change.

Diff Detail

Repository
rL LLVM

Event Timeline

pcc accepted this revision.Mar 22 2018, 1:27 PM

LGTM

Might be nice to have a test for this -- see llvm/test/Bitcode/attributes.ll.

include/llvm/IR/Attributes.td
139 ↗(On Diff #139493)

Update comment.

This revision is now accepted and ready to land.Mar 22 2018, 1:27 PM
vlad.tsyrklevich marked an inline comment as done.
  • Fix comment
  • Add an attribute test
kcc accepted this revision.Mar 27 2018, 5:17 PM

LGTM with a nit

docs/LangRef.rst
1709 ↗(On Diff #139553)

Should this be a link?

This revision was automatically updated to reflect the committed changes.
pcc added inline comments.Apr 3 2018, 1:37 PM
llvm/trunk/lib/Transforms/IPO/ForceFunctionAttrs.cpp
56

Copy-paste error? Should probably be .Case("shadowcallstack", Attribute::ShadowCallStack).

llvm/trunk/lib/Transforms/IPO/ForceFunctionAttrs.cpp
56

Damn, thanks for pointing that out.