[compiler-rt] r321677 - [asan] Restore asan_device_setup compatibility with older libraries.

Evgeniy Stepanov via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 2 13:35:23 PST 2018


Author: eugenis
Date: Tue Jan  2 13:35:23 2018
New Revision: 321677

URL: http://llvm.org/viewvc/llvm-project?rev=321677&view=rev
Log:
[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

Modified:
    compiler-rt/trunk/lib/asan/scripts/asan_device_setup

Modified: compiler-rt/trunk/lib/asan/scripts/asan_device_setup
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/scripts/asan_device_setup?rev=321677&r1=321676&r2=321677&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/scripts/asan_device_setup (original)
+++ compiler-rt/trunk/lib/asan/scripts/asan_device_setup Tue Jan  2 13:35:23 2018
@@ -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




More information about the llvm-commits mailing list