[cfi] Safe handling of unaddressable vtable pointers (compiler-rt).
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Wed, 3 Feb 2016 22:19:04 +0000 (22:19 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Wed, 3 Feb 2016 22:19:04 +0000 (22:19 +0000)
commit73583d5f2daaddec91725abf50a1f8b439f409d3
tree59c2c3a8248e86f72af8938c23ec7806952d73aa
parentf31ea30694af66ffbd7e2e265090c97e1b91e8d9
[cfi] Safe handling of unaddressable vtable pointers (compiler-rt).

Avoid crashing when printing diagnostics for vtable-related CFI
errors. In diagnostic mode, the frontend does an additional check of
the vtable pointer against the set of all known vtable addresses and
lets the runtime handler know if it is safe to inspect the vtable.

http://reviews.llvm.org/D16824

llvm-svn: 259717
compiler-rt/lib/cfi/cfi.cc
compiler-rt/lib/ubsan/ubsan_handlers.cc
compiler-rt/lib/ubsan/ubsan_handlers.h
compiler-rt/lib/ubsan/ubsan_handlers_cxx.cc
compiler-rt/test/cfi/cross-dso/target_out_of_bounds.cpp
compiler-rt/test/cfi/target_uninstrumented.cpp [new file with mode: 0644]