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 7311f063a0ad8984ab47808cd8120ecb8dd8decb..83e78107832647e10942ccc15e0f5854bd6999c7 100644 |
--- a/test/unittests/wasm/ast-decoder-unittest.cc |
+++ b/test/unittests/wasm/ast-decoder-unittest.cc |
@@ -238,6 +238,11 @@ TEST_F(AstDecoderTest, GetLocal0_local) { |
EXPECT_VERIFIES(sigs.i_v(), kCodeGetLocal0); |
} |
+TEST_F(AstDecoderTest, TooManyLocals) { |
+ AddLocals(kAstI32, 4034986500); |
+ EXPECT_FAILURE(sigs.i_v(), kCodeGetLocal0); |
+} |
+ |
TEST_F(AstDecoderTest, GetLocal0_param_n) { |
FunctionSig* array[] = {sigs.i_i(), sigs.i_ii(), sigs.i_iii()}; |