]> granicus.if.org Git - clang/commit
Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO"
authorStephan Bergmann <sbergman@redhat.com>
Tue, 16 Jul 2019 06:23:27 +0000 (06:23 +0000)
committerStephan Bergmann <sbergman@redhat.com>
Tue, 16 Jul 2019 06:23:27 +0000 (06:23 +0000)
commit90eb9824a592140f0d1ac70d0c5cf4377710ac76
treebdb48896f26a3110ab1614c3601de56e2eba9f1c
parentce7674d7be842d4863b410ce1dfd89416256e9c1
Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO"

i.e., recent 5745eccef54ddd3caca278d1d292a88b2281528b:

* Bump the function_type_mismatch handler version, as its signature has changed.

* The function_type_mismatch handler can return successfully now, so
  SanitizerKind::Function must be AlwaysRecoverable (like for
  SanitizerKind::Vptr).

* But the minimal runtime would still unconditionally treat a call to the
  function_type_mismatch handler as failure, so disallow -fsanitize=function in
  combination with -fsanitize-minimal-runtime (like it was already done for
  -fsanitize=vptr).

* Add tests.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@366186 91177308-0d34-0410-b5e6-96231b3b80d8
docs/UndefinedBehaviorSanitizer.rst
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CodeGenFunction.h
lib/Driver/SanitizerArgs.cpp
test/CodeGen/ubsan-function.cpp [new file with mode: 0644]
test/Driver/fsanitize.c