summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-12-28 12:45:23 +0000
committerStephan Bergmann <sbergman@redhat.com>2017-12-28 12:45:23 +0000
commitc4cfd9451c04abf2130819a91fd5f1965c8468f1 (patch)
treeba114f4f83ea7c61241686e0174ef209e61b434b /lib
parent3bd6c8e44cf530bbf8c0e57b571f4bfc7d48b698 (diff)
-fsanitize=vptr warnings on bad static types in dynamic_cast and typeid
...when such an operation is done on an object during con-/destruction. (This adds a test case to compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp that, unlike the existing test cases there, wants to detect multiple UBSan warnings in one go. Therefore, that file had to be changed from globally using -fno-sanitize-recover to individually using halt_on_error only where appropriate.) This is the compiler-rt part of a patch covering both cfe and compiler-rt. Differential Revision: https://reviews.llvm.org/D40295 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@321518 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/ubsan/ubsan_handlers.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ubsan/ubsan_handlers.cc b/lib/ubsan/ubsan_handlers.cc
index f674c027c..bcda746a1 100644
--- a/lib/ubsan/ubsan_handlers.cc
+++ b/lib/ubsan/ubsan_handlers.cc
@@ -38,7 +38,8 @@ bool ignoreReport(SourceLocation SLoc, ReportOptions Opts, ErrorType ET) {
const char *TypeCheckKinds[] = {
"load of", "store to", "reference binding to", "member access within",
"member call on", "constructor call on", "downcast of", "downcast of",
- "upcast of", "cast to virtual base of", "_Nonnull binding to"};
+ "upcast of", "cast to virtual base of", "_Nonnull binding to",
+ "dynamic operation on"};
}
static void handleTypeMismatchImpl(TypeMismatchData *Data, ValueHandle Pointer,