Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1964)

Unified Diff: test/unittests/wasm/function-body-decoder-unittest.cc

Issue 2646093003: [wasm] Unreachability fix for br_table. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/wasm/function-body-decoder.cc ('K') | « src/wasm/function-body-decoder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/wasm/function-body-decoder-unittest.cc
diff --git a/test/unittests/wasm/function-body-decoder-unittest.cc b/test/unittests/wasm/function-body-decoder-unittest.cc
index 196e2357c5e18ce48a0360d414ea7bd4ae5ba40b..455d5aea1e77f615c5e9609862a2448f8fef920d 100644
--- a/test/unittests/wasm/function-body-decoder-unittest.cc
+++ b/test/unittests/wasm/function-body-decoder-unittest.cc
@@ -2133,6 +2133,12 @@ TEST_F(FunctionBodyDecoderTest, BrTable_invalid_br2) {
}
}
+TEST_F(FunctionBodyDecoderTest, BrUnreachable) {
+ static byte code[] = {WASM_GET_LOCAL(0), kExprBrTable, 0,
+ BR_TARGET(0), kExprSetLocal, 0};
+ EXPECT_VERIFIES_C(v_i, code);
+}
+
TEST_F(FunctionBodyDecoderTest, Brv1) {
EXPECT_VERIFIES(i_i, WASM_BLOCK_I(WASM_BRV(0, WASM_ZERO)));
EXPECT_VERIFIES(i_i, WASM_BLOCK_I(WASM_LOOP(WASM_BRV(2, WASM_ZERO))));
« src/wasm/function-body-decoder.cc ('K') | « src/wasm/function-body-decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698