This is an archive of the discontinued LLVM Phabricator instance.

[cfi] Cross-DSO CFI diagnostic mode (compiler-rt part)
ClosedPublic

Authored by eugenis on Dec 18 2015, 6:16 PM.

Details

Reviewers
kcc
pcc
Summary
  • add __cfi_slowpath_diag with a 3rd parameter which a pointer to the diagnostic info for the ubsan handlers.
  • __cfi_check gets a 3rd parameter as well.
  • unify vcall/cast/etc and icall diagnostic info format, and merge the handlers to have a single entry point (actually two points due to abort/noabort variants).
  • tests

Note that this comes with a tiny overhead in the non-diag mode: cfi_slowpath must pass 0 as the 3rd argument to cfi_check.

Diff Detail

Repository
rL LLVM

Event Timeline

eugenis updated this revision to Diff 43290.Dec 18 2015, 6:16 PM
eugenis retitled this revision from to [cfi] Cross-DSO CFI diagnostic mode (compiler-rt part).
eugenis updated this object.
eugenis added reviewers: pcc, kcc.
eugenis set the repository for this revision to rL LLVM.
eugenis added a subscriber: llvm-commits.
eugenis updated this revision to Diff 43395.Dec 21 2015, 1:07 PM
pcc added inline comments.Jan 12 2016, 5:35 PM
lib/ubsan/ubsan_handlers.cc
551

Move to the reserved namespace.

eugenis updated this revision to Diff 44806.Jan 13 2016, 3:43 PM
pcc accepted this revision.Jan 25 2016, 1:58 PM
pcc edited edge metadata.

LGTM

lib/ubsan/ubsan_handlers.h
152

Rename this one as well.

This revision is now accepted and ready to land.Jan 25 2016, 1:58 PM
eugenis updated this revision to Diff 45917.Jan 25 2016, 2:36 PM
eugenis edited edge metadata.
eugenis marked an inline comment as done.