]> granicus.if.org Git - libvpx/commitdiff
vp8_decode: add missing vpx_clear_system_state
authorJames Zern <jzern@google.com>
Sat, 15 Feb 2020 05:00:21 +0000 (21:00 -0800)
committerJames Zern <jzern@google.com>
Sat, 15 Feb 2020 05:03:56 +0000 (21:03 -0800)
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

test/invalid_file_test.cc
test/test-data.mk
test/test-data.sha1
vp8/vp8_dx_iface.c

index 8fb9859ae49209b2c0f402719502f877e03135bf..8b1bc56c9bb9137a422c93178a3589f451326197 100644 (file)
@@ -124,6 +124,7 @@ TEST_P(InvalidFileTest, ReturnCode) { RunTest(); }
 #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" },
 };
index 905f0138e64feb5dadd1ed6587da6e6e8ed6359a..81f035d83a1e5c58b1ba2acb998aa3bae83bb85f 100644 (file)
@@ -737,6 +737,8 @@ endif  # CONFIG_VP9_HIGHBITDEPTH
 # 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
index 8f0084c47052b75baf891d798c060e08dac63351..dcaea286675306caac36fa630d483791e417d463 100644 (file)
@@ -866,3 +866,5 @@ c62b005a9fd32c36a1b3f67de6840330f9915e34 *invalid-crbug-1562.ivf
 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
index 82a716254aa04fb24a3ea9163d5f464dd10402d3..43156a078b6ef40862354b72958bcc243db8301a 100644 (file)
@@ -456,6 +456,7 @@ static vpx_codec_err_t vp8_decode(vpx_codec_alg_priv_t *ctx,
     }
 
     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.