summaryrefslogtreecommitdiffstats
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
commit556e963e4e8bec385940e08bb26b87dd832b9aab (patch)
tree6fa7fcc9e37e94c0c64486216edeb831c100bb3a
parente518c800f6ec46ad25aade3f964718dbb7c2ec50 (diff)
downloadbcm5719-llvm-556e963e4e8bec385940e08bb26b87dd832b9aab.tar.gz
bcm5719-llvm-556e963e4e8bec385940e08bb26b87dd832b9aab.zip
[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. llvm-svn: 269233
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc b/compiler-rt/lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc
index 1082ccfd6a8..f38886acd54 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc
+++ b/compiler-rt/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,
OpenPOWER on IntegriCloud