Skip to content

Commit 2db14a5

Browse files
committedJan 2, 2018
[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 llvm-svn: 321677
1 parent 06f19a0 commit 2db14a5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

‎compiler-rt/lib/asan/scripts/asan_device_setup

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,13 @@ exec $_to \$@
336336
EOF
337337
}
338338

339+
# On Android-L not allowing user segv handler breaks some applications.
340+
# Since ~May 2017 this is the default setting; included for compatibility with
341+
# older library versions.
342+
if [[ PRE_L -eq 0 ]]; then
343+
ASAN_OPTIONS="$ASAN_OPTIONS,allow_user_segv_handler=1"
344+
fi
345+
339346
if [[ x$extra_options != x ]] ; then
340347
ASAN_OPTIONS="$ASAN_OPTIONS,$extra_options"
341348
fi

0 commit comments

Comments
 (0)
Please sign in to comment.