@@ -97,15 +97,19 @@ SANITIZER_INTERFACE_WEAK_DEF(void, __ubsan_report_error_fatal, const char *kind,
97
97
98
98
#if defined(__ANDROID__)
99
99
extern " C" __attribute__((weak)) void android_set_abort_message (const char *);
100
- static void abort_with_message (const char *kind, uintptr_t caller) {
100
+ static void abort_with_message (const char *kind, uintptr_t caller,
101
+ const uintptr_t *address) {
101
102
char msg_buf[128 ];
102
- format_msg (kind, caller, msg_buf, msg_buf + sizeof (msg_buf));
103
+ format_msg (kind, caller, address, msg_buf, msg_buf + sizeof (msg_buf));
103
104
if (&android_set_abort_message)
104
105
android_set_abort_message (msg_buf);
105
106
abort ();
106
107
}
107
108
#else
108
- static void abort_with_message (const char *kind, uintptr_t caller) { abort (); }
109
+ static void abort_with_message (const char *kind, uintptr_t caller,
110
+ const uintptr_t *address) {
111
+ abort ();
112
+ }
109
113
#endif
110
114
111
115
#if SANITIZER_DEBUG
@@ -132,7 +136,7 @@ void NORETURN CheckFailed(const char *file, int, const char *cond, u64, u64) {
132
136
INTERFACE void __ubsan_handle_##name##_minimal_abort() { \
133
137
uintptr_t caller = GET_CALLER_PC (); \
134
138
__ubsan_report_error_fatal (kind, caller, nullptr ); \
135
- abort_with_message (kind, caller); \
139
+ abort_with_message (kind, caller, nullptr ); \
136
140
}
137
141
138
142
#define HANDLER (name, kind ) \
@@ -149,7 +153,7 @@ void NORETURN CheckFailed(const char *file, int, const char *cond, u64, u64) {
149
153
const uintptr_t address) { \
150
154
uintptr_t caller = GET_CALLER_PC (); \
151
155
__ubsan_report_error_fatal (kind, caller, &address); \
152
- abort_with_message (kind, caller); \
156
+ abort_with_message (kind, caller, &address); \
153
157
}
154
158
155
159
// A version of a handler that takes a pointer to a value.
0 commit comments