Index: compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cc =================================================================== --- compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cc +++ compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cc @@ -407,7 +407,18 @@ } void RawWrite(const char *buffer) { - __sanitizer_log_write(buffer, internal_strlen(buffer)); + static _Thread_local char line[128]; + static _Thread_local unsigned long cur = 0; + + while (*buffer) { + if (cur >= sizeof(line) || *buffer == '\n') { + __sanitizer_log_write(line, cur); + cur = 0; + if (*buffer == '\n') ++buffer; + } else { + line[cur++] = *buffer++; + } + } } void CatastrophicErrorWrite(const char *buffer, uptr length) {