]> granicus.if.org Git - clang/commit
[ubsan] Don't emit function signatures for non-static member functions
authorVedant Kumar <vsk@apple.com>
Sat, 14 Oct 2017 01:23:30 +0000 (01:23 +0000)
committerVedant Kumar <vsk@apple.com>
Sat, 14 Oct 2017 01:23:30 +0000 (01:23 +0000)
commit94cbcd43babae9b83e826f25ee8aa21069c53d94
tree4304c545ee1e103b64dd3591a1a58b0bedb09073
parent4318ef1cb398b9b72aea287a815c09cfe68a2b27
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@315786 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CodeGenFunction.cpp
test/CodeGenCXX/catch-undef-behavior.cpp