[PATCH] D24781: [ubsan] Respect log_to_syslog=1 on Darwin

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 26 13:19:23 PDT 2016


vsk abandoned this revision.
vsk added a comment.

This patch is looking more complicated than it needs to be. Since asl_log has been obsoleted by os_log, I think it'd be better to focus on moving to the new API than adding something messy like "DarwinLogInit".


================
Comment at: lib/sanitizer_common/sanitizer_mac.cc:505
@@ +504,3 @@
+  // registry lock. See this discussion: https://reviews.llvm.org/D24781
+  if (!atomic_load(reinterpret_cast<atomic_uint32_t *>(&is_log_threadsafe),
+                   memory_order_acquire))
----------------
zaks.anna wrote:
> The expected behavior is that we **do** log to syslog for ASan and TSan when log_to_syslog is set.
Ah, yikes! `is_log_threadsafe` or some equivalent should only have been checked if we're not in the LogFullErrorReport path.


https://reviews.llvm.org/D24781





More information about the llvm-commits mailing list