[PATCH] D13452: [asan] On OS X, log reports to syslog and os_trace (version 2)
Anna Zaks via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 6 18:32:15 PDT 2015
zaks.anna marked an inline comment as done.
================
Comment at: lib/asan/asan_report.cc:674
@@ +673,3 @@
+ error_message_buf_mutex.Lock();
+ LogFullErrorReport(error_message_buffer);
+
----------------
samsonov wrote:
> You can just add a scope and BlockingMutexLock here.
Report calls Print, which might call AppendToErrorMessageBuffer resulting in double locking.
================
Comment at: lib/sanitizer_common/sanitizer_mac.cc:379
@@ +378,3 @@
+void LogFullErrorReport(const char *error_message_buffer) {
+ // Log with os_trace. This will make it into the crash log.
+ if (GetMacosVersion() >= MACOS_VERSION_MAVERICKS) {
----------------
samsonov wrote:
> const char *kNameMapping[][2] = {
> {"AddressSanitizer", "Address Sanitizer"},
> {"ThreadSanitizer", "Thread Sanitizer"},
> ...
> };
>
> and then a loop, would probably reduce duplication. Also, add some kind of comment about why you want space.
>
The main issue here is not the space but that the os_trace API does not work with anything but the string literal constants (for privacy reasons).
http://reviews.llvm.org/D13452
More information about the llvm-commits
mailing list