HomePhabricator

[ubsan] Don't emit function signatures for non-static member functions

Description

[ubsan] Don't emit function signatures for non-static member functions

The function sanitizer only checks indirect calls through function
pointers. This excludes all non-static member functions (constructor
calls, calls through thunks, etc. all use a separate code path). Don't
emit function signatures for functions that won't be checked.

Apart from cutting down on code size, this should fix a regression on
Linux caused by r313096. For context, see the mailing list discussion:

r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

Testing: check-clang, check-ubsan

Differential Revision: https://reviews.llvm.org/D38913

Details

Committed
vedantkOct 13 2017, 6:23 PM
Differential Revision
D38913: [ubsan] Don't emit function signatures for virtual methods
Parents
rC315785: [Lex] Avoid out-of-bounds dereference in SkipLineComment
Branches
Unknown
Tags
Unknown