This is an archive of the discontinued LLVM Phabricator instance.

Ignore blacklist when generating __cfi_check_fail.
ClosedPublic

Authored by eugenis on Jun 21 2018, 2:05 PM.

Event Timeline

eugenis created this revision.Jun 21 2018, 2:05 PM

Another option is to add a special case to blacklist logic to make it not apply to __cfi_check_fail.

Yet another option is to make blacklist not apply to functions without a source location, but that seems to be done intentionally here:
http://llvm-cs.pcc.me.uk/tools/clang/lib/CodeGen/CodeGenModule.cpp#1827

pcc added a comment.Jun 21 2018, 3:36 PM

__cfi_check_fail certainly seems like a special case in that its behaviour is controlled only by flags and not the blacklist.

Maybe a simpler fix would be to add this to the top of EmitCfiCheckFail?

SanOpts = CGM.getLangOpts().Sanitize;
eugenis updated this revision to Diff 152395.Jun 21 2018, 3:42 PM

Simplify code.

Yes, that's better.

pcc accepted this revision.Jun 21 2018, 3:47 PM

LGTM

This revision is now accepted and ready to land.Jun 21 2018, 3:47 PM
This revision was automatically updated to reflect the committed changes.