[PATCH] D40295: -fsanitize=vptr warnings on bad static types in dynamic_cast and typeid

Stephan Bergmann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 21 04:39:09 PST 2017


sberg created this revision.
Herald added a subscriber: kubamracek.

...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.


https://reviews.llvm.org/D40295

Files:
  clang/lib/CodeGen/CGExpr.cpp
  clang/lib/CodeGen/CGExprCXX.cpp
  clang/lib/CodeGen/CodeGenFunction.h
  compiler-rt/lib/ubsan/ubsan_handlers.cc
  compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40295.123764.patch
Type: text/x-patch
Size: 14461 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171121/8f2cbbb3/attachment.bin>


More information about the cfe-commits mailing list