mirror of
https://github.com/intel/llvm.git
synced 2026-02-07 16:11:27 +08:00
[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
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user