diff options
-rw-r--r-- | compiler-rt/include/sanitizer/asan_interface.h | 4 | ||||
-rw-r--r-- | compiler-rt/lib/asan/asan_report.cc | 4 | ||||
-rw-r--r-- | compiler-rt/lib/asan/asan_rtl.cc | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/compiler-rt/include/sanitizer/asan_interface.h b/compiler-rt/include/sanitizer/asan_interface.h index c3382ceca03..6e8ae87232a 100644 --- a/compiler-rt/include/sanitizer/asan_interface.h +++ b/compiler-rt/include/sanitizer/asan_interface.h @@ -122,6 +122,10 @@ extern "C" { uptr __asan_region_is_poisoned(uptr beg, uptr size) SANITIZER_INTERFACE_ATTRIBUTE; + // Print the description of addr (useful when debugging in gdb). + void __asan_describe_address(uptr addr) + SANITIZER_INTERFACE_ATTRIBUTE; + // This is an internal function that is called to report an error. // However it is still a part of the interface because users may want to // set a breakpoint on this function in a debugger. diff --git a/compiler-rt/lib/asan/asan_report.cc b/compiler-rt/lib/asan/asan_report.cc index 37f13e02d7c..35ab9cabde6 100644 --- a/compiler-rt/lib/asan/asan_report.cc +++ b/compiler-rt/lib/asan/asan_report.cc @@ -669,6 +669,10 @@ void NOINLINE __asan_set_error_report_callback(void (*callback)(const char*)) { } } +void __asan_describe_address(uptr addr) { + DescribeAddress(addr, 1); +} + #if !SANITIZER_SUPPORTS_WEAK_HOOKS // Provide default implementation of __asan_on_error that does nothing // and may be overriden by user. diff --git a/compiler-rt/lib/asan/asan_rtl.cc b/compiler-rt/lib/asan/asan_rtl.cc index 9ed320ab95d..9dadd6c02a3 100644 --- a/compiler-rt/lib/asan/asan_rtl.cc +++ b/compiler-rt/lib/asan/asan_rtl.cc @@ -254,6 +254,7 @@ static NOINLINE void force_interface_symbols() { case 32: __asan_poison_stack_memory(0, 0); break; case 33: __asan_unpoison_stack_memory(0, 0); break; case 34: __asan_region_is_poisoned(0, 0); break; + case 35: __asan_describe_address(0); break; } } |