summaryrefslogtreecommitdiff
path: root/src/tools/wasm-shell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/wasm-shell.cpp')
-rw-r--r--src/tools/wasm-shell.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/tools/wasm-shell.cpp b/src/tools/wasm-shell.cpp
index 83d39c9d4..670f5783d 100644
--- a/src/tools/wasm-shell.cpp
+++ b/src/tools/wasm-shell.cpp
@@ -171,6 +171,17 @@ static void run_asserts(Name moduleName, size_t* i, bool* checked, Module* wasm,
break;
}
}
+ for (auto& segment : wasm.table.segments) {
+ for (auto name : segment.data) {
+ // spec tests consider it illegal to use spectest.print in a table
+ if (auto* import = wasm.checkImport(name)) {
+ if (import->module == SPECTEST && import->base == PRINT) {
+ std::cerr << "cannot put spectest.print in table\n";
+ invalid = true;
+ }
+ }
+ }
+ }
}
if (!invalid) {
Colors::red(std::cerr);