diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/interp/interp.cc | 2 | ||||
-rw-r--r-- | src/tools/spectest-interp.cc | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/interp/interp.cc b/src/interp/interp.cc index 74f33eb8..cb5623d8 100644 --- a/src/interp/interp.cc +++ b/src/interp/interp.cc @@ -1989,7 +1989,7 @@ RunResult Thread::DoCall(const Func::Ptr& func, Trap::Ptr* out_trap) { PushValues(func_type.results, results); } else { if (PushCall(*cast<DefinedFunc>(func.get()), out_trap) == RunResult::Trap) { - return RunResult::Ok; + return RunResult::Trap; } } return RunResult::Ok; diff --git a/src/tools/spectest-interp.cc b/src/tools/spectest-interp.cc index 130edd66..9e7e32e3 100644 --- a/src/tools/spectest-interp.cc +++ b/src/tools/spectest-interp.cc @@ -1406,8 +1406,9 @@ ActionResult CommandRunner::RunAction(int line_number, switch (action->type) { case ActionType::Invoke: { auto* func = cast<interp::Func>(extern_.get()); - func->Call(store_, action->args, result.values, &result.trap, - s_trace_stream); + auto ok = func->Call(store_, action->args, result.values, &result.trap, + s_trace_stream); + assert((ok == Result::Ok) == (!result.trap)); result.types = func->type().results; if (verbose == RunVerbosity::Verbose) { WriteCall(s_stdout_stream.get(), action->field_name, func->type(), |