diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp --- a/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp +++ b/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp @@ -820,11 +820,11 @@ inline void CRAppendCrashLogMessage(const char *msg) { BlockingMutexLock l(&__crashreporter_info_mutex__); + internal_strlcat(__crashreporter_info_buff__, msg, + sizeof(__crashreporter_info_buff__)); #if HAVE_CRASHREPORTERCLIENT_H (void)CRSetCrashLogMessage(__crashreporter_info_buff__); #endif - internal_strlcat(__crashreporter_info_buff__, msg, - sizeof(__crashreporter_info_buff__)); } void LogMessageOnPrintf(const char *str) {