[tsan] Implement __tsan_get_alloc_stack and __tsan_locate_address to query pointer...
authorKuba Mracek <mracek@apple.com>
Mon, 19 Dec 2016 17:52:20 +0000 (17:52 +0000)
committerKuba Mracek <mracek@apple.com>
Mon, 19 Dec 2016 17:52:20 +0000 (17:52 +0000)
commit1187cbd20fe3f08345321820476511828f5c7b34
tree3a04cd2c1d8daf7afe9eb06659a7b8b49704ca25
parentdd46b52942c2e461c4e3c41747a583c1a9a89375
[tsan] Implement __tsan_get_alloc_stack and __tsan_locate_address to query pointer types and allocation stacks of heap pointers

In ASan, we have __asan_locate_address and __asan_get_alloc_stack, which is used in LLDB/Xcode to show the allocation backtrace for a heap memory object. This patch implements the same for TSan.

Differential Revision: https://reviews.llvm.org/D27656

llvm-svn: 290119
compiler-rt/lib/tsan/rtl/tsan_debugging.cc
compiler-rt/lib/tsan/rtl/tsan_interface.h
compiler-rt/lib/tsan/rtl/tsan_rtl.h
compiler-rt/test/tsan/debug_alloc_stack.cc [new file with mode: 0644]
compiler-rt/test/tsan/debug_locate.cc [new file with mode: 0644]