shithub: libvpx

Download patch

ref: 7afac52ba66be13da66eb91e8b0a1776105b40c5
parent: 03b779e99bd45bfd6aef6184f6f636ed51e3b13d
author: James Zern <jzern@google.com>
date: Tue Nov 5 18:02:44 EST 2019

test/vp[89]_boolcoder_test: quiet msan warnings

the bitreaders may fill beyond what was written to the buffer as an
optimization. the data isn't used meaningfully, but it may trigger a
msan warning.

BUG=b/140939146

Change-Id: Id03cd203b8ee7ecaf6fdfe3f3c9f2ccfec527129

--- a/test/vp8_boolcoder_test.cc
+++ b/test/vp8_boolcoder_test.cc
@@ -93,6 +93,9 @@
         }
 
         vp8_stop_encode(&bw);
+        // vp8dx_bool_decoder_fill() may read into uninitialized data that
+        // isn't used meaningfully, but may trigger an MSan warning.
+        memset(bw_buffer + bw.pos, 0, sizeof(VP8_BD_VALUE) - 1);
 
         BOOL_DECODER br;
         encrypt_buffer(bw_buffer, kBufferSize);
--- a/test/vp9_boolcoder_test.cc
+++ b/test/vp9_boolcoder_test.cc
@@ -66,6 +66,9 @@
         }
 
         vpx_stop_encode(&bw);
+        // vpx_reader_fill() may read into uninitialized data that
+        // isn't used meaningfully, but may trigger an MSan warning.
+        memset(bw_buffer + bw.pos, 0, sizeof(BD_VALUE) - 1);
 
         // First bit should be zero
         GTEST_ASSERT_EQ(bw_buffer[0] & 0x80, 0);