diff options
Diffstat (limited to 'gnu/llvm/compiler-rt/lib/asan/asan_allocator.cpp')
-rw-r--r-- | gnu/llvm/compiler-rt/lib/asan/asan_allocator.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gnu/llvm/compiler-rt/lib/asan/asan_allocator.cpp b/gnu/llvm/compiler-rt/lib/asan/asan_allocator.cpp index 65c51fbafdd..126d26d0823 100644 --- a/gnu/llvm/compiler-rt/lib/asan/asan_allocator.cpp +++ b/gnu/llvm/compiler-rt/lib/asan/asan_allocator.cpp @@ -1037,8 +1037,19 @@ uptr PointsIntoChunk(void* p) { return 0; } +// Debug code. Delete once issue #1193 is chased down. +extern "C" SANITIZER_WEAK_ATTRIBUTE const char *__lsan_current_stage; + uptr GetUserBegin(uptr chunk) { __asan::AsanChunk *m = __asan::instance.GetAsanChunkByAddrFastLocked(chunk); + if (!m) + Printf( + "ASAN is about to crash with a CHECK failure.\n" + "The ASAN developers are trying to chase down this bug,\n" + "so if you've encountered this bug please let us know.\n" + "See also: https://github.com/google/sanitizers/issues/1193\n" + "chunk: %p caller %p __lsan_current_stage %s\n", + chunk, GET_CALLER_PC(), __lsan_current_stage); CHECK(m); return m->Beg(); } |