summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/wasm-ctor-eval.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tools/wasm-ctor-eval.cpp b/src/tools/wasm-ctor-eval.cpp
index dee342255..e11454b04 100644
--- a/src/tools/wasm-ctor-eval.cpp
+++ b/src/tools/wasm-ctor-eval.cpp
@@ -31,6 +31,7 @@
#include "wasm-io.h"
#include "wasm-interpreter.h"
#include "wasm-builder.h"
+#include "wasm-validator.h"
#include "ir/memory-utils.h"
#include "ir/global-utils.h"
#include "ir/import-utils.h"
@@ -412,6 +413,11 @@ int main(int argc, const char* argv[]) {
}
}
+ if (!WasmValidator().validate(wasm)) {
+ WasmPrinter::printModule(&wasm);
+ Fatal() << "error in validating input";
+ }
+
// get list of ctors, and eval them
std::vector<std::string> ctors;
std::istringstream stream(ctorsString);