summaryrefslogtreecommitdiff
path: root/include/sanitizer
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2012-10-02 14:06:39 +0000
committerAlexey Samsonov <samsonov@google.com>2012-10-02 14:06:39 +0000
commit866334332ff8c2a1b7f3715224614b6b75a7578c (patch)
tree337b92479ce95bad3ea95ad4f9e9130ca1182b18 /include/sanitizer
parent3334e12d33261cb8f211f2f49f28ddfa027a40c3 (diff)
[ASan] Change __asan_set_on_error_callback to weak overridable __asan_on_error, so that ASan would call the latter even if it finds the error early (i.e. during module initialization)
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@165008 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/sanitizer')
-rw-r--r--include/sanitizer/asan_interface.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/include/sanitizer/asan_interface.h b/include/sanitizer/asan_interface.h
index 787e8116c..788e90f4c 100644
--- a/include/sanitizer/asan_interface.h
+++ b/include/sanitizer/asan_interface.h
@@ -128,12 +128,11 @@ extern "C" {
void __asan_set_error_report_callback(void (*callback)(const char*))
SANITIZER_INTERFACE_ATTRIBUTE;
- // Sets the callback to be called right when ASan detects an error.
- // This can be used to notice cases when ASan detects an error, but the
- // program crashes before ASan report is printed.
- // Passing 0 unsets the callback.
- void __asan_set_on_error_callback(void (*callback)(void))
- SANITIZER_INTERFACE_ATTRIBUTE;
+ // User may provide function that would be called right when ASan detects
+ // an error. This can be used to notice cases when ASan detects an error, but
+ // the program crashes before ASan report is printed.
+ void __asan_on_error()
+ SANITIZER_WEAK_ATTRIBUTE SANITIZER_INTERFACE_ATTRIBUTE;
// User may provide its own implementation for symbolization function.
// It should print the description of instruction at address "pc" to