summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2018-01-02 21:35:23 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2018-01-02 21:35:23 +0000
commiteb0aba42cb29cce1e832510650e73d2988460fbe (patch)
treeb7b0b2b0a97cf431333e6ce30f7d831eab8d9951 /lib
parentc41d3f086b0c267efb242b5fb0b6ad42ba442720 (diff)
[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
Diffstat (limited to 'lib')
-rwxr-xr-xlib/asan/scripts/asan_device_setup7
1 files changed, 7 insertions, 0 deletions
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