[PATCH] D13452: [asan] On OS X, log reports to syslog and os_trace (version 2)

Alexander Potapenko via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 6 10:00:00 PDT 2015


glider added inline comments.

================
Comment at: lib/asan/asan_report.cc:47
@@ -46,2 +46,3 @@
 static ReportData report_data = {};
+static BlockingMutex append_to_error_buf;
 
----------------
filcab wrote:
> I'd prefer this to have "mutex" or "lock" (or a variation of one) in the name.
Which variables does this mutex protect?
I suspect |error_message_buffer| belongs to those, therefore you need to acquire this mutex every time you access |error_message_buffer|.
I also suggest you declare the mutex next to error_message_xxx declarations (and change the name as proposed by Filipe)

================
Comment at: lib/sanitizer_common/sanitizer_common_libcdep.cc:15
@@ -14,2 +14,3 @@
 #include "sanitizer_common.h"
+#include "sanitizer_allocator_internal.h"
 #include "sanitizer_flags.h"
----------------
Please keep the includes sorted alphabetically.

================
Comment at: lib/sanitizer_common/sanitizer_mac.cc:385
@@ +384,3 @@
+      case SANITIZER_TYPE_ADDRESS:
+        os_trace("Address Sanitizer reported a failure.");
+        break;
----------------
I think the spelling outside Xcode must be "AddressSanitizer" (ditto for other sanitizers).
Kostya, WDYT?


http://reviews.llvm.org/D13452





More information about the llvm-commits mailing list