forked from OSchip/llvm-project
b7692bc3e9
Summary: iOS on ARM64 doesn't unique RTTI. Ref: clang's iOS64CXXABI::shouldRTTIBeUnique() Due to this, pointer-equality will not necessarily work in this architecture, across dylib boundaries. dynamic_cast<>() will (as expected) still work, since Apple ships with one prepared for this, but we can't rely on the type names being pointer-equal. I've limited the expensive strcmp check to the specific architecture which needs it. Example which triggers this bug: lib.h: struct X { virtual ~X() {} }; X *libCall(); lib.mm: X *libCall() { return new X; } prog.mm: int main() { X *px = libCall(); delete px; } Expected output: Nothing Actual output: <unknown>: runtime error: member call on address 0x00017001ef50 which does not point to an object of type 'X' 0x00017001ef50: note: object is of type 'X' 00 00 00 00 60 00 0f 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^~~~~~~~~~~~~~~~~~~~~~~ vptr for ‘X’ Reviewers: kubabrecka, samsonov, eugenis, rsmith Subscribers: aemerson, llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D11502 llvm-svn: 262147 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
ubsan.syms.extra | ||
ubsan_checks.inc | ||
ubsan_diag.cc | ||
ubsan_diag.h | ||
ubsan_flags.cc | ||
ubsan_flags.h | ||
ubsan_flags.inc | ||
ubsan_handlers.cc | ||
ubsan_handlers.h | ||
ubsan_handlers_cxx.cc | ||
ubsan_handlers_cxx.h | ||
ubsan_init.cc | ||
ubsan_init.h | ||
ubsan_init_standalone.cc | ||
ubsan_platform.h | ||
ubsan_type_hash.cc | ||
ubsan_type_hash.h | ||
ubsan_type_hash_itanium.cc | ||
ubsan_type_hash_win.cc | ||
ubsan_value.cc | ||
ubsan_value.h |