[PATCH] D14470: [asan] Fix the deadlocks introduced by "On OS X, log reports to syslog and os_trace" commit

Kuba Brecka via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 19 07:53:53 PST 2015


kubabrecka added a comment.

LGTM with a few nits.


================
Comment at: lib/asan/asan_report.cc:692
@@ -689,1 +691,3 @@
+    // lock that gets aquired during printing.
+    InternalScopedBuffer<char> buffer_copy(error_message_buffer_size);
     {
----------------
Use InternalScopedString instead of InternalScopedBuffer<char>.

================
Comment at: lib/sanitizer_common/sanitizer_common.h:52
@@ -51,1 +51,3 @@
 
+static const uptr ErrorMessageBufferSize = 1 << 16;
+
----------------
Rename to "kErrorMessageBufferSize".

================
Comment at: lib/sanitizer_common/sanitizer_common.h:661
@@ -654,3 +660,3 @@
 #if SANITIZER_MAC
-void LogFullErrorReport(const char *error_message_buffer);
+void LogFullErrorReport(InternalScopedBuffer<char> *buffer);
 #else
----------------
Do we need to pass InternalScopedBuffer/InternalScopedString?  Can we keep it as `const char *`?


http://reviews.llvm.org/D14470





More information about the llvm-commits mailing list