[compiler-rt] r269233 - [asan] Don't use libcorkscrew on Android L+.

Evgeniy Stepanov via llvm-commits llvm-commits at lists.llvm.org
Wed May 11 13:53:43 PDT 2016


Author: eugenis
Date: Wed May 11 15:53:43 2016
New Revision: 269233

URL: http://llvm.org/viewvc/llvm-project?rev=269233&view=rev
Log:
[asan] Don't use libcorkscrew on Android L+.

ASan runtime library used libcorkscrew from Android platform for
stack unwinding. Since Android L, this is both unnecessary (the
libgcc unwinder has been fixed) and impossible (the library is not
there any more). Don't even try.

This should have not effect on modern Android devices other than
removing a message about failing to open the library with
ASAN_OPTIONS=verbosity=1.

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc?rev=269233&r1=269232&r2=269233&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc Wed May 11 15:53:43 2016
@@ -48,6 +48,11 @@ unwind_backtrace_signal_arch_func unwind
 
 #if SANITIZER_ANDROID
 void SanitizerInitializeUnwinder() {
+  if (AndroidGetApiLevel() >= ANDROID_LOLLIPOP_MR1) return;
+
+  // Pre-lollipop Android can not unwind through signal handler frames with
+  // libgcc unwinder, but it has a libcorkscrew.so library with the necessary
+  // workarounds.
   void *p = dlopen("libcorkscrew.so", RTLD_LAZY);
   if (!p) {
     VReport(1,




More information about the llvm-commits mailing list