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 c32e873ef8dde2d8e4d78148165445727df0bd8e..d7dbbd7dbeaf7d069996ab080fa76c66a16429b0 100644 |
--- a/test/unittests/wasm/module-decoder-unittest.cc |
+++ b/test/unittests/wasm/module-decoder-unittest.cc |
@@ -388,7 +388,6 @@ TEST_F(WasmModuleVerifyTest, OneFunctionImported) { |
if (result.val) delete result.val; |
} |
- |
TEST_F(WasmModuleVerifyTest, OneFunctionWithNopBody) { |
static const byte kCodeStartOffset = 19; |
static const byte kCodeEndOffset = kCodeStartOffset + 1; |
@@ -1095,6 +1094,20 @@ TEST_F(WasmModuleVerifyTest, ImportTable_one_sig) { |
EXPECT_VERIFIES(data); |
} |
+TEST_F(WasmModuleVerifyTest, ImportTable_invalid_module) { |
+ static const byte data[] = { |
+ kDeclSignatures, |
+ 1, |
+ VOID_VOID_SIG, |
+ kDeclImportTable, |
+ 1, // -- |
+ SIG_INDEX(0), // sig index |
+ NAME_OFFSET(0), // module name |
+ NAME_OFFSET(1) // function name |
+ }; |
+ EXPECT_FAILURE(data); |
+} |
+ |
TEST_F(WasmModuleVerifyTest, ImportTable_off_end) { |
static const byte data[] = { |
kDeclSignatures, 1, VOID_VOID_SIG, kDeclImportTable, 1, |