Index: test/unittests/wasm/ast-decoder-unittest.cc |
diff --git a/test/unittests/wasm/ast-decoder-unittest.cc b/test/unittests/wasm/ast-decoder-unittest.cc |
index f73264168b3b8ab2dd6e121d4608245b17b44500..070767e7188a71fc9baeb9cbb813467e02738830 100644 |
--- a/test/unittests/wasm/ast-decoder-unittest.cc |
+++ b/test/unittests/wasm/ast-decoder-unittest.cc |
@@ -1311,11 +1311,6 @@ |
return result; |
} |
- void InitializeFunctionTable() { |
- mod.function_tables.push_back( |
- {0, 0, true, std::vector<int32_t>(), false, false, SignatureMap()}); |
- } |
- |
private: |
WasmModule mod; |
}; |
@@ -1426,7 +1421,6 @@ |
TEST_F(AstDecoderTest, SimpleIndirectCalls) { |
FunctionSig* sig = sigs.i_i(); |
TestModuleEnv module_env; |
- module_env.InitializeFunctionTable(); |
module = &module_env; |
byte f0 = module_env.AddSignature(sigs.i_v()); |
@@ -1442,7 +1436,6 @@ |
TEST_F(AstDecoderTest, IndirectCallsOutOfBounds) { |
FunctionSig* sig = sigs.i_i(); |
TestModuleEnv module_env; |
- module_env.InitializeFunctionTable(); |
module = &module_env; |
EXPECT_FAILURE_S(sig, WASM_CALL_INDIRECT0(0, WASM_ZERO)); |
@@ -1459,7 +1452,6 @@ |
TEST_F(AstDecoderTest, IndirectCallsWithMismatchedSigs3) { |
FunctionSig* sig = sigs.i_i(); |
TestModuleEnv module_env; |
- module_env.InitializeFunctionTable(); |
module = &module_env; |
byte f0 = module_env.AddFunction(sigs.i_f()); |
@@ -1477,21 +1469,6 @@ |
EXPECT_FAILURE_S(sig, WASM_CALL_INDIRECT1(f1, WASM_ZERO, WASM_I8(16))); |
EXPECT_FAILURE_S(sig, WASM_CALL_INDIRECT1(f1, WASM_ZERO, WASM_I64V_1(16))); |
EXPECT_FAILURE_S(sig, WASM_CALL_INDIRECT1(f1, WASM_ZERO, WASM_F32(17.6))); |
-} |
- |
-TEST_F(AstDecoderTest, IndirectCallsWithoutTableCrash) { |
- FunctionSig* sig = sigs.i_i(); |
- TestModuleEnv module_env; |
- module = &module_env; |
- |
- byte f0 = module_env.AddSignature(sigs.i_v()); |
- byte f1 = module_env.AddSignature(sigs.i_i()); |
- byte f2 = module_env.AddSignature(sigs.i_ii()); |
- |
- EXPECT_FAILURE_S(sig, WASM_CALL_INDIRECT0(f0, WASM_ZERO)); |
- EXPECT_FAILURE_S(sig, WASM_CALL_INDIRECT1(f1, WASM_ZERO, WASM_I8(22))); |
- EXPECT_FAILURE_S( |
- sig, WASM_CALL_INDIRECT2(f2, WASM_ZERO, WASM_I8(32), WASM_I8(72))); |
} |
TEST_F(AstDecoderTest, SimpleImportCalls) { |