diff options
-rw-r--r-- | src/tools/wasm-interp.c | 1 | ||||
-rw-r--r-- | test/spec/globals.txt | 26 | ||||
m--------- | third_party/testsuite | 0 |
3 files changed, 26 insertions, 1 deletions
diff --git a/src/tools/wasm-interp.c b/src/tools/wasm-interp.c index 117ad47d..844c20a5 100644 --- a/src/tools/wasm-interp.c +++ b/src/tools/wasm-interp.c @@ -1189,6 +1189,7 @@ static WasmResult on_assert_malformed_command(Context* ctx, new_custom_error_handler(ctx, "assert_malformed"); WasmInterpreterEnvironment env; WASM_ZERO_MEMORY(env); + init_environment(ctx->allocator, &env); ctx->total++; char* path = create_module_path(ctx, filename); diff --git a/test/spec/globals.txt b/test/spec/globals.txt index 647092f5..d892937e 100644 --- a/test/spec/globals.txt +++ b/test/spec/globals.txt @@ -41,5 +41,29 @@ assert_invalid error: out/third_party/testsuite/globals.wast:95:11: initializer expression can only reference a previously defined global (module (global i32 (get_global 1)) (global i32 (i32.const 0))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -16/16 tests passed. +assert_malformed error: + out/third_party/testsuite/globals.wast:102:20: error in binary module: @0x00000022: global mutability must be 0 or 1 +(assert_malformed (module "\00asm\0d\00\00\00\02\94\80\80\80\00\01\08\73\70\6... + ^^^^^^ +assert_malformed error: + out/third_party/testsuite/globals.wast:107:20: error in binary module: @0x00000011: global mutability must be 0 or 1 +(assert_malformed (module "\00asm\0d\00\00\00\06\86\80\80\80\00\01\7f\ff\41\0... + ^^^^^^ +assert_malformed error: + out/third_party/testsuite/globals.wast:108:20: error in binary module: @0x00000011: global mutability must be 0 or 1 +(assert_malformed (module "\00asm\0d\00\00\00\06\86\80\80\80\00\01\7f\d4\41\0... + ^^^^^^ +assert_malformed error: + out/third_party/testsuite/globals.wast:109:20: error in binary module: @0x00000011: global mutability must be 0 or 1 +(assert_malformed (module "\00asm\0d\00\00\00\06\86\80\80\80\00\01\7f\02\41\0... + ^^^^^^ +out/third_party/testsuite/globals.wast:102: assert_malformed passed: + error: @0x00000022: global mutability must be 0 or 1 +out/third_party/testsuite/globals.wast:107: assert_malformed passed: + error: @0x00000011: global mutability must be 0 or 1 +out/third_party/testsuite/globals.wast:108: assert_malformed passed: + error: @0x00000011: global mutability must be 0 or 1 +out/third_party/testsuite/globals.wast:109: assert_malformed passed: + error: @0x00000011: global mutability must be 0 or 1 +20/20 tests passed. ;;; STDOUT ;;) diff --git a/third_party/testsuite b/third_party/testsuite -Subproject f71cbe72bd5f4fb871bee39a9dc1278fa662a8a +Subproject d9579064336793c91c67806f6bd76d6b024ce9c |