[ASan] Do not rely on malloc context in allocator reports.
commit1b17f5b79d58c5aff291dde05727ad0b215b81c6
authorAlexey Samsonov <samsonov@google.com>
Wed, 13 Nov 2013 14:46:58 +0000 (13 14:46 +0000)
committerAlexey Samsonov <samsonov@google.com>
Wed, 13 Nov 2013 14:46:58 +0000 (13 14:46 +0000)
tree5ce639a22a08ff9a1b585e1397c01e106ae2d9e9
parent348aac42b606dd2d4cec9d68a85bf0144bd7c2f3
[ASan] Do not rely on malloc context in allocator reports.

Invoke a fatal stack trace unwinder when ASan prints allocator-relevant
error reports (double-free, alloc-dealloc-mismatch, invalid-free).
Thus we'll be able to print complete stack trace even if allocation/free
stacks are not stored (malloc_context_size=0).

Based on the patch by Yuri Gribov!

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194579 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed:
lib/asan/asan_allocator.h
lib/asan/asan_allocator2.cc
lib/asan/asan_malloc_linux.cc
lib/asan/asan_malloc_win.cc
lib/asan/asan_report.cc
lib/asan/asan_report.h
lib/asan/lit_tests/TestCases/Linux/malloc_delete_mismatch.cc
lib/asan/lit_tests/TestCases/double-free.cc
lib/asan/lit_tests/TestCases/invalid-free.cc
lib/asan/tests/asan_noinst_test.cc
lib/sanitizer_common/sanitizer_stacktrace.h
lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc
lib/sanitizer_common/tests/sanitizer_stacktrace_test.cc