diff options
author | Ben Smith <binjimin@gmail.com> | 2017-01-24 11:16:36 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-24 11:16:36 -0800 |
commit | 27e054f1fe4db13e02eaef649bb4bfe71b0efc68 (patch) | |
tree | 6d46a3511cd9edf58c79a396c17ab05952276708 /src/tools/wasm-interp.c | |
parent | f2f782dde1152057a4aed421ba89578c31ea66b6 (diff) | |
download | wabt-27e054f1fe4db13e02eaef649bb4bfe71b0efc68.tar.gz wabt-27e054f1fe4db13e02eaef649bb4bfe71b0efc68.tar.bz2 wabt-27e054f1fe4db13e02eaef649bb4bfe71b0efc68.zip |
Update testsuite (#291)
Also:
* Check all data/elem segments before updating memory/tables
* assert_exhaustion should check for call stack or value stack
exhaustion.
* Don't allow out-of-bound size 0 data segments
Diffstat (limited to 'src/tools/wasm-interp.c')
-rw-r--r-- | src/tools/wasm-interp.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/tools/wasm-interp.c b/src/tools/wasm-interp.c index 433979c3..0dc66d3d 100644 --- a/src/tools/wasm-interp.c +++ b/src/tools/wasm-interp.c @@ -1484,12 +1484,13 @@ static WasmResult on_assert_exhaustion_command(Context* ctx, ctx->total++; WasmResult result = run_action(ctx, action, &iresult, &results, RUN_QUIET); if (WASM_SUCCEEDED(result)) { - if (iresult == WASM_INTERPRETER_TRAP_CALL_STACK_EXHAUSTED) { - ctx->passed++; - } else { - print_command_error(ctx, "expected call stack exhaustion"); - result = WASM_ERROR; - } + if (iresult == WASM_INTERPRETER_TRAP_CALL_STACK_EXHAUSTED || + iresult == WASM_INTERPRETER_TRAP_VALUE_STACK_EXHAUSTED) { + ctx->passed++; + } else { + print_command_error(ctx, "expected call stack exhaustion"); + result = WASM_ERROR; + } } wasm_destroy_interpreter_typed_value_vector(ctx->allocator, &results); |