diff options
-rw-r--r-- | src/tools/wasm-interp.cc | 1 | ||||
-rw-r--r-- | test/interp/start-failure.txt | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/tools/wasm-interp.cc b/src/tools/wasm-interp.cc index d9c0aa29..f1acfc88 100644 --- a/src/tools/wasm-interp.cc +++ b/src/tools/wasm-interp.cc @@ -220,6 +220,7 @@ static wabt::Result ReadAndRunModule(const char* module_filename) { } else { WriteResult(s_stdout_stream.get(), "error running start function", exec_result.result); + return wabt::Result::Error; } } return result; diff --git a/test/interp/start-failure.txt b/test/interp/start-failure.txt new file mode 100644 index 00000000..04b91762 --- /dev/null +++ b/test/interp/start-failure.txt @@ -0,0 +1,9 @@ +;;; TOOL: run-interp +;;; ERROR: 1 +(module + (func $start unreachable) + (start $start) +) +(;; STDOUT ;;; +error running start function: unreachable executed +;;; STDOUT ;;) |