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

Anna Zaks via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 19 16:04:25 PST 2015


zaks.anna added inline comments.

================
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);
     {
----------------
kubabrecka wrote:
> Use InternalScopedString instead of InternalScopedBuffer<char>.
It's a buffer because we treat it as a buffer later on. For example, RemoveANSIEscapeSequencesFromString modifies it in place and modifies the raw data. (If it were a string, its length would get invalidated.)


http://reviews.llvm.org/D14470





More information about the llvm-commits mailing list