[PATCH] D41679: [asan] Restore asan_device_setup compatibility with older libraries.

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 2 13:26:22 PST 2018

eugenis created this revision.
eugenis added a reviewer: vitalybuka.
Herald added subscribers: kubamracek, srhines.

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.



Index: compiler-rt/lib/asan/scripts/asan_device_setup
--- compiler-rt/lib/asan/scripts/asan_device_setup
+++ compiler-rt/lib/asan/scripts/asan_device_setup
@@ -336,6 +336,13 @@
+# 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"
 if [[ x$extra_options != x ]] ; then

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41679.128454.patch
Type: text/x-patch
Size: 620 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180102/da0a44ee/attachment.bin>

More information about the llvm-commits mailing list