forked from OSchip/llvm-project
![]() Summary: __ubsan::getFunctionLocation() used to issue a call to symbolizer, and convert the result (SymbolizedStack) to one of UBSan structures: SourceLocation, ModuleLocation or MemoryLocation. This: (1) is inefficient: we do an extra allocation/deallocation to copy data, while we can instead can just pass SymbolizedStack around (which contains all the necessary data). (2) leaks memory: strings stored in SourceLocation/MemoryLocation are never deallocated, and Filipe Cabecinhas suggests this causes crashes of UBSan-ified programs in the wild. Instead, let Location store a pointer to SymbolizedStack object, and make sure it's properly deallocated when UBSan handler exits. ModuleLocation is made obsolete by this change, and is deleted. Test Plan: check-ubsan test suite Reviewers: rsmith, filcab Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7548 llvm-svn: 228869 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
Makefile.mk | ||
ubsan.syms.extra | ||
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_type_hash.cc | ||
ubsan_type_hash.h | ||
ubsan_value.cc | ||
ubsan_value.h |