[PATCH] D40100: [sanitizer] Use runtime checks instead of API level for Android logging
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 15 14:49:15 PST 2017
eugenis accepted this revision.
eugenis added inline comments.
This revision is now accepted and ready to land.
================
Comment at: lib/sanitizer_common/sanitizer_linux_libcdep.cc:542
-// 64-bit Android targets don't provide the deprecated __android_log_write.
-// Starting with the L release, syslog() works and is preferable to
-// __android_log_write.
----------------
Please preserve the comment about syslog being broken pre-L. This is another reason why we prefer __android_log_write when both are available.
__android_log_write may not allocate memory, but it does call pthread_mutex_lock sometimes.
================
Comment at: lib/sanitizer_common/sanitizer_linux_libcdep.cc:567
+ } else if (&__android_log_write) {
+ __android_log_write(SANITIZER_ANDROID_LOG_INFO, NULL, s);
+ } else {
----------------
nullptr
https://reviews.llvm.org/D40100
More information about the llvm-commits
mailing list