Skip to content

Commit 8885f82

Browse files
committed
Repatch.
1 parent 6043590 commit 8885f82

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler-rt/lib/ubsan_minimal/ubsan_minimal_handlers.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include "sanitizer_common/sanitizer_atomic.h"
22

3-
#include <stdio.h>
43
#include <stdlib.h>
54
#include <stdint.h>
65
#include <string.h>
@@ -49,7 +48,8 @@ static void format_msg(const char *kind, uintptr_t caller, char *buf,
4948
*buf = '\0';
5049
}
5150

52-
static void report_error(const char *kind, uintptr_t caller) {
51+
SANITIZER_INTERFACE_WEAK_DEF(void, __ubsan_report_error, const char *kind,
52+
uintptr_t caller) {
5353
if (caller == 0)
5454
return;
5555
while (true) {
@@ -115,13 +115,13 @@ void NORETURN CheckFailed(const char *file, int, const char *cond, u64, u64) {
115115

116116
#define HANDLER_RECOVER(name, kind) \
117117
INTERFACE void __ubsan_handle_##name##_minimal() { \
118-
report_error(kind, GET_CALLER_PC()); \
118+
__ubsan_report_error(kind, GET_CALLER_PC()); \
119119
}
120120

121121
#define HANDLER_NORECOVER(name, kind) \
122122
INTERFACE void __ubsan_handle_##name##_minimal_abort() { \
123123
uintptr_t caller = GET_CALLER_PC(); \
124-
report_error(kind, caller); \
124+
__ubsan_report_error(kind, caller); \
125125
abort_with_message(kind, caller); \
126126
}
127127

0 commit comments

Comments
 (0)