Index: test/unittests/wasm/module-decoder-unittest.cc |
diff --git a/test/unittests/wasm/module-decoder-unittest.cc b/test/unittests/wasm/module-decoder-unittest.cc |
index 258ac7311abda9a0d4c6505e9fe11ad2ffaea935..3ad142bce0cc3eaae709a25d06b3a67bb5b43a44 100644 |
--- a/test/unittests/wasm/module-decoder-unittest.cc |
+++ b/test/unittests/wasm/module-decoder-unittest.cc |
@@ -1461,6 +1461,25 @@ TEST_F(WasmModuleVerifyTest, Names_two_empty) { |
EXPECT_VERIFIES(data); |
} |
+TEST_F(WasmModuleVerifyTest, Regression684855) { |
+ static const byte data[] = { |
+ SECTION_NAMES(12), |
+ 0xfb, // functions count |
+ 0x27, // | |
+ 0x00, // function name length |
+ 0xff, // local names count |
+ 0xff, // | |
+ 0xff, // | |
+ 0xff, // | |
+ 0xff, // | |
+ 0xff, // error: "varint too large" |
+ 0xff, // | |
+ 0x00, // -- |
+ 0x00 // -- |
+ }; |
+ EXPECT_VERIFIES(data); |
+} |
+ |
#define EXPECT_INIT_EXPR(Type, type, value, ...) \ |
{ \ |
static const byte data[] = {__VA_ARGS__, kExprEnd}; \ |