shithub: libvpx

Download patch

ref: 0f3fe088fab5998c37910f3cc539a48fa1a72c14
parent: 9cfcac1cb3b2e765c24706a9e966859d588bc4ef
author: James Zern <jzern@google.com>
date: Fri Feb 14 16:00:21 EST 2020

vp8_decode: add missing vpx_clear_system_state

this avoids leaving the floating point unit in an inconsistent state on
error and breaking subsequent tests on x86
the test clip invalid-bug-148271109.ivf would also result in a sanitizer
error prior to:
vp8,GetSigned: silence unsigned int overflow warning

BUG=b/148271109

Change-Id: Ia254f3892ac1eeec51db5e9d42ea071545db0cd8

--- a/test/invalid_file_test.cc
+++ b/test/invalid_file_test.cc
@@ -124,6 +124,7 @@
 #if CONFIG_VP8_DECODER
 const DecodeParam kVP8InvalidFileTests[] = {
   { 1, "invalid-bug-1443.ivf" },
+  { 1, "invalid-bug-148271109.ivf" },
   { 1, "invalid-token-partition.ivf" },
   { 1, "invalid-vp80-00-comprehensive-s17661_r01-05_b6-.ivf" },
 };
--- a/test/test-data.mk
+++ b/test/test-data.mk
@@ -737,6 +737,8 @@
 # Invalid files for testing libvpx error checking.
 LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += invalid-bug-1443.ivf
 LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += invalid-bug-1443.ivf.res
+LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += invalid-bug-148271109.ivf
+LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += invalid-bug-148271109.ivf.res
 LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += invalid-token-partition.ivf
 LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += invalid-token-partition.ivf.res
 LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += invalid-vp80-00-comprehensive-018.ivf.2kf_0x6.ivf
--- a/test/test-data.sha1
+++ b/test/test-data.sha1
@@ -866,3 +866,5 @@
 f0cd8389948ad16085714d96567612136f6a46c5 *invalid-crbug-1562.ivf.res
 bac455906360b45338a16dd626ac5f19bc36a307 *desktop_office1.1280_720-020.yuv
 094be4b80fa30bd227149ea16ab6476d549ea092 *slides_code_term_web_plot.1920_1080.yuv
+518a0be998afece76d3df76047d51e256c591ff2 *invalid-bug-148271109.ivf
+d3964f9dad9f60363c81b688324d95b4ec7c8038 *invalid-bug-148271109.ivf.res
--- a/vp8/vp8_dx_iface.c
+++ b/vp8/vp8_dx_iface.c
@@ -456,6 +456,7 @@
     }
 
     if (setjmp(pbi->common.error.jmp)) {
+      vpx_clear_system_state();
       /* We do not know if the missing frame(s) was supposed to update
        * any of the reference buffers, but we act conservative and
        * mark only the last buffer as corrupted.