[PATCH] D11981: [asan] On OS X, log reports to syslog and os_trace
Alexey Samsonov via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 12 16:30:27 PDT 2015
samsonov added inline comments.
================
Comment at: lib/asan/asan_report.cc:53
@@ -47,10 +52,3 @@
void AppendToErrorMessageBuffer(const char *buffer) {
- if (error_message_buffer) {
- uptr length = internal_strlen(buffer);
- CHECK_GE(error_message_buffer_size, error_message_buffer_pos);
- uptr remaining = error_message_buffer_size - error_message_buffer_pos;
- internal_strncpy(error_message_buffer + error_message_buffer_pos,
- buffer, remaining);
- error_message_buffer[error_message_buffer_size - 1] = '\0';
- // FIXME: reallocate the buffer instead of truncating the message.
- error_message_buffer_pos += Min(remaining, length);
+ if (!error_message_buffer) {
+ error_message_buffer_size = 1 << 16;
----------------
Is this function called under some mutex? Can we check for that?
================
Comment at: lib/asan/asan_report.cc:721
@@ -666,3 +720,3 @@
if (error_report_callback) {
error_report_callback(error_message_buffer);
}
----------------
So, does it mean that `error_report_callback` is invoked with ANSI escape sequences? Maybe, we don't need them there either?
http://reviews.llvm.org/D11981
More information about the llvm-commits
mailing list