summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2016-05-11 20:53:43 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2016-05-11 20:53:43 +0000
commit87c6f402863aa7bd7ba16aede1bc479942208aef (patch)
tree5a95d75d95e5194164cb4ead1a799e71e06fbca7 /lib
parent8512db2a1b2bacb8b142109f3e177a3f14d6ca6f (diff)
[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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@269233 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc b/lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc
index 1082ccfd6..f38886acd 100644
--- a/lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc
+++ b/lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc
@@ -48,6 +48,11 @@ unwind_backtrace_signal_arch_func unwind_backtrace_signal_arch;
#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,