diff options
Diffstat (limited to 'src/tools/wasm-shell.cpp')
-rw-r--r-- | src/tools/wasm-shell.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/tools/wasm-shell.cpp b/src/tools/wasm-shell.cpp index 72e8e13ba..32bc746b2 100644 --- a/src/tools/wasm-shell.cpp +++ b/src/tools/wasm-shell.cpp @@ -125,7 +125,13 @@ static void run_asserts(size_t* i, bool* checked, Module* wasm, // maybe parsed ok, but otherwise incorrect invalid = !WasmValidator().validate(wasm); } - assert(invalid); + if (!invalid) { + Colors::red(std::cerr); + std::cerr << "[should have been invalid]\n"; + Colors::normal(std::cerr); + std::cerr << &wasm << '\n'; + abort(); + } } else if (id == INVOKE) { assert(wasm); Invocation invocation(curr, instance.get(), *builder->get()); |