From eb0aba42cb29cce1e832510650e73d2988460fbe Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Tue, 2 Jan 2018 21:35:23 +0000 Subject: [asan] Restore asan_device_setup compatibility with older libraries. Summary: This way new asan_device_setup, which knows about the quirks of recent releases of Android, can be used with older ASan runtime library (say, from an NDK release). The library is version locked to the compiler, and is often hard or impossible to update. Reviewers: vitalybuka Subscribers: srhines, kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D41679 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@321677 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/asan/scripts/asan_device_setup | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/asan/scripts/asan_device_setup b/lib/asan/scripts/asan_device_setup index 92a109727..ca008c037 100755 --- a/lib/asan/scripts/asan_device_setup +++ b/lib/asan/scripts/asan_device_setup @@ -336,6 +336,13 @@ exec $_to \$@ EOF } +# On Android-L not allowing user segv handler breaks some applications. +# Since ~May 2017 this is the default setting; included for compatibility with +# older library versions. +if [[ PRE_L -eq 0 ]]; then + ASAN_OPTIONS="$ASAN_OPTIONS,allow_user_segv_handler=1" +fi + if [[ x$extra_options != x ]] ; then ASAN_OPTIONS="$ASAN_OPTIONS,$extra_options" fi -- cgit v1.2.3