diff options
Diffstat (limited to 'compiler-rt/lib/asan/asan_interface.h')
| -rw-r--r-- | compiler-rt/lib/asan/asan_interface.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler-rt/lib/asan/asan_interface.h b/compiler-rt/lib/asan/asan_interface.h index 5a23329925b..54a0312f2f5 100644 --- a/compiler-rt/lib/asan/asan_interface.h +++ b/compiler-rt/lib/asan/asan_interface.h @@ -134,6 +134,16 @@ extern "C" { void __asan_set_on_error_callback(void (*callback)(void)) SANITIZER_INTERFACE_ATTRIBUTE; + // User may register its own symbolization function. It should print + // the description of instruction at address "pc" to "out_buffer". + // Description should be at most "out_size" bytes long. + // User-specified function should return true if symbolization was + // successful. + typedef bool (*__asan_symbolize_callback)(const void *pc, char *out_buffer, + int out_size); + void __asan_set_symbolize_callback(__asan_symbolize_callback callback) + SANITIZER_INTERFACE_ATTRIBUTE; + // Returns the estimated number of bytes that will be reserved by allocator // for request of "size" bytes. If ASan allocator can't allocate that much // memory, returns the maximal possible allocation size, otherwise returns |

