From 0f3fe088fab5998c37910f3cc539a48fa1a72c14 Mon Sep 17 00:00:00 2001 From: James Zern Date: Fri, 14 Feb 2020 21:00:21 -0800 Subject: [PATCH] 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 --- test/invalid_file_test.cc | 1 + test/test-data.mk | 2 ++ test/test-data.sha1 | 2 ++ vp8/vp8_dx_iface.c | 1 + 4 files changed, 6 insertions(+) diff --git a/test/invalid_file_test.cc b/test/invalid_file_test.cc index 8fb9859ae..8b1bc56c9 100644 --- a/test/invalid_file_test.cc +++ b/test/invalid_file_test.cc @@ -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" }, }; diff --git a/test/test-data.mk b/test/test-data.mk index 905f0138e..81f035d83 100644 --- a/test/test-data.mk +++ b/test/test-data.mk @@ -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 diff --git a/test/test-data.sha1 b/test/test-data.sha1 index 8f0084c47..dcaea2866 100644 --- a/test/test-data.sha1 +++ b/test/test-data.sha1 @@ -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 diff --git a/vp8/vp8_dx_iface.c b/vp8/vp8_dx_iface.c index 82a716254..43156a078 100644 --- a/vp8/vp8_dx_iface.c +++ b/vp8/vp8_dx_iface.c @@ -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. -- 2.50.0