[PATCH] D40149: [sanitizer] New attempt at using runtime checks for Android logging

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 16 15:19:31 PST 2017


eugenis added inline comments.


================
Comment at: lib/sanitizer_common/sanitizer_linux_libcdep.cc:566
+    async_safe_write_log(SANITIZER_ANDROID_LOG_INFO, GetProcessName(), s);
+  } else if (&__android_log_write && (AndroidGetApiLevel() <= ANDROID_KITKAT)) {
+    __android_log_write(SANITIZER_ANDROID_LOG_INFO, nullptr, s);
----------------
I'd replace this with CHECK(&__android_log_write) and move this case below syslog() so that things are sorted in the order of preference:
async_safe_write_log
(L+) syslog
__android_log_write


https://reviews.llvm.org/D40149





More information about the llvm-commits mailing list