[PATCH] D11435: [sanitizer] Implement logging to syslog

Evgeniy Stepanov eugenis at google.com
Wed Jul 22 16:55:10 PDT 2015


eugenis added inline comments.

================
Comment at: lib/sanitizer_common/sanitizer_posix_libcdep.cc:295
@@ +294,3 @@
+
+static void WriteOneLineToSyslog(const char *s) {
+  if (atomic_load(&android_log_initialized, memory_order_acquire))
----------------
samsonov wrote:
> Note that if `android_log_initialized` will be initialized while you are looping inside `WriteToSyslog`, the latter will start logging since the middle of the `buffer`, which is probably undesirable. Yeah, I know that it's highly unlikely, but you may still add `static bool IsSyslogAvailable()`, and call it once at the beginning of `WriteToSyslog`.
Good idea.


http://reviews.llvm.org/D11435







More information about the llvm-commits mailing list