summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/asan/asan_debugging.cc
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2015-01-22 13:33:16 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2015-01-22 13:33:16 +0000
commitd38af30b74841a51cad519e0d04ec3c9515d0ccb (patch)
tree28e21e14b2c0a3d216f1f53d65d560dbee84bf44 /compiler-rt/lib/asan/asan_debugging.cc
parenta713fce5399276459d7c5881619b5349739a10c0 (diff)
downloadbcm5719-llvm-d38af30b74841a51cad519e0d04ec3c9515d0ccb.tar.gz
bcm5719-llvm-d38af30b74841a51cad519e0d04ec3c9515d0ccb.zip
[msan] Better use-after-free reports.
By attaching an extra integer tag to heap origins, we are able to distinguish between uninits - created by heap allocation, - created by heap deallocation (i.e. use-after-free), - created by __msan_allocated_memory call, - etc. See https://code.google.com/p/memory-sanitizer/issues/detail?id=35. llvm-svn: 226821
Diffstat (limited to 'compiler-rt/lib/asan/asan_debugging.cc')
-rw-r--r--compiler-rt/lib/asan/asan_debugging.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler-rt/lib/asan/asan_debugging.cc b/compiler-rt/lib/asan/asan_debugging.cc
index 2b66dd5265f..6fc5b690de9 100644
--- a/compiler-rt/lib/asan/asan_debugging.cc
+++ b/compiler-rt/lib/asan/asan_debugging.cc
@@ -81,8 +81,8 @@ void AsanLocateAddress(uptr addr, AddressDescription *descr) {
GetInfoForHeapAddress(addr, descr);
}
-uptr AsanGetStack(uptr addr, uptr *trace, uptr size, u32 *thread_id,
- bool alloc_stack) {
+static uptr AsanGetStack(uptr addr, uptr *trace, u32 size, u32 *thread_id,
+ bool alloc_stack) {
AsanChunkView chunk = FindHeapChunkByAddress(addr);
if (!chunk.IsValid()) return 0;
OpenPOWER on IntegriCloud