Skip to content

Commit 753e228

Browse files
committed
Addressed more comments.
1 parent 334a4f8 commit 753e228

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
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
@@ -20,8 +20,8 @@ static __sanitizer::atomic_uintptr_t caller_pcs[kMaxCallerPcs];
2020
// that "too many errors" has already been reported.
2121
static __sanitizer::atomic_uint32_t caller_pcs_sz;
2222

23-
SANITIZER_INTERFACE_WEAK_DEF(void, __ubsan_report_error, uintptr_t caller,
24-
const char *msg, const char *decorated_msg) {
23+
SANITIZER_INTERFACE_WEAK_DEF(void, __ubsan_report_error, const char *msg,
24+
uintptr_t caller, const char *decorated_msg) {
2525
if (caller == 0)
2626
return;
2727
while (true) {
@@ -102,15 +102,15 @@ constexpr unsigned kAddrBuf = SANITIZER_WORDSIZE / 4;
102102
uintptr_t caller = GET_CALLER_PC(); \
103103
char msg_buf[MSG_BUF_LEN(msg)] = MSG_TMPL(msg); \
104104
decorate_msg(MSG_TMPL_END(msg_buf, msg), caller); \
105-
__ubsan_report_error(caller, msg, msg_buf); \
105+
__ubsan_report_error(msg, caller, msg_buf); \
106106
}
107107

108108
#define HANDLER_NORECOVER(name, msg) \
109109
INTERFACE void __ubsan_handle_##name##_minimal_abort() { \
110110
uintptr_t caller = GET_CALLER_PC(); \
111111
char msg_buf[MSG_BUF_LEN(msg)] = MSG_TMPL(msg); \
112112
decorate_msg(MSG_TMPL_END(msg_buf, msg), caller); \
113-
__ubsan_report_error(caller, #msg, msg_buf); \
113+
__ubsan_report_error(msg, caller, msg_buf); \
114114
abort_with_message(msg_buf); \
115115
}
116116

compiler-rt/test/ubsan_minimal/TestCases/override-callback.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
static int Result;
77

8-
void __ubsan_report_error(uintptr_t caller, const char *msg,
9-
const char *decorated_msg) {
8+
void __ubsan_report_error(const char *msg, uintptr_t caller,
9+
const char *decorated_msg) {
1010
fprintf(stderr, "CUSTOM_CALLBACK: %s\n", msg);
1111
}
1212

0 commit comments

Comments
 (0)