aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2019-07-26 23:28:07 -0700
committerJames Zern <jzern@google.com>2020-01-08 16:59:47 -0800
commite3518debb9d346ed156a79e71ffff565d5a03a32 (patch)
treef87b32cae846a364cef43e6da1ad8bace60439bf
parent1787cb9462cfd87e0601705ab30ccb24aeeb3f70 (diff)
downloadwebp-e3518debb9d346ed156a79e71ffff565d5a03a32.tar.gz
external/webp: enable WEBP_USE_THREAD
this serializes dsp function pointer initialization avoiding the potential for multiple initialization or code reordering in the non-threaded case. if the latter were to occur there would be a race condition where the pointers had the potential to be uninitialized, resulting in a crash. Test: aosp_arm-eng aosp_arm64-eng aosp_x86-eng aosp_x86_64-eng aosp_crosshatch-userdebug build Bug: https://crbug.com/webp/419 Bug: b/139274551 Change-Id: Iaecdf4718820d304d216fc7583ef2b0130a64e9a
-rw-r--r--Android.bp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index ec57ba74..d7e0eb04 100644
--- a/Android.bp
+++ b/Android.bp
@@ -109,6 +109,7 @@ cc_library_static {
"-O2",
"-DANDROID",
"-DWEBP_SWAP_16BIT_CSP",
+ "-DWEBP_USE_THREAD",
"-Wall",
"-Werror",
],
@@ -205,6 +206,7 @@ cc_library_static {
"-O2",
"-DANDROID",
"-DWEBP_SWAP_16BIT_CSP",
+ "-DWEBP_USE_THREAD",
"-Wall",
"-Werror",
],