This is an archive of the discontinued LLVM Phabricator instance.

[CFI] Diagnose when we CFI in diagnostic mode is unavailable on a toolchain.
ClosedPublic

Authored by samsonov on Jun 25 2015, 3:32 PM.

Details

Summary

Namely, we must have proper C++ABI support in UBSan runtime. We don't
have a good way to check for that, so just assume that C++ABI support is
there whenever -fsanitize=vptr is supported (i.e. only on handful of
platforms).

Exact diagnostic is also tricky. It's not "cfi" that is unsupported,
just the diagnostic mode. So, I suggest to report that
"-fno-sanitize-trap=cfi-foobar" is incompatible with a given target
toolchain.

Diff Detail

Repository
rL LLVM

Event Timeline

samsonov updated this revision to Diff 28509.Jun 25 2015, 3:32 PM
samsonov retitled this revision from to [CFI] Diagnose when we CFI in diagnostic mode is unavailable on a toolchain..
samsonov updated this object.
samsonov edited the test plan for this revision. (Show Details)
samsonov added a reviewer: pcc.
samsonov added a subscriber: Unknown Object (MLST).
pcc accepted this revision.Jun 25 2015, 3:58 PM
pcc edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jun 25 2015, 3:58 PM
This revision was automatically updated to reflect the committed changes.