[go: nahoru, domu]

Set $UBSAN_OPTIONS in the LibraryLoader.

We cannot rely on an instrumentation extra to pass the
value of $UBSAN_OPTIONS to Java because some tests, such as
webview_instrumentation_test_apk, do not use "am instrument" to launch
APKs containing native code. The solution is to move the code that
sets $UBSAN_OPTIONS into LibraryLoader and arrange for it to be run
by all clients of LibraryLoader.

There doesn't seem to be a simple way to deduplicate the value of
$UBSAN_OPTIONS between the Java code and the Python code so I've
duplicated it with a comment for now.

Bug: 469376
Change-Id: Iefb225601d5e963efbcd6cb4db8d158bb35afd19
Reviewed-on: https://chromium-review.googlesource.com/826106
Reviewed-by: agrieve <agrieve@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524845}
10 files changed