From d38eeadc55a4b3a97b2879ba3d13a50224c28df6 Mon Sep 17 00:00:00 2001 From: Daniel Wirtz Date: Wed, 1 Nov 2017 23:46:07 +0100 Subject: Restrict validation output to just validation errors in the API (#1253) Do not print the entire and possibly very large module when validation fails. Leave printing to tools using the validator, instead of always doing it in the validator where it can't be overridden. --- src/tools/wasm-as.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/tools/wasm-as.cpp') diff --git a/src/tools/wasm-as.cpp b/src/tools/wasm-as.cpp index d456f43fd..0e053e05a 100644 --- a/src/tools/wasm-as.cpp +++ b/src/tools/wasm-as.cpp @@ -94,6 +94,7 @@ int main(int argc, const char *argv[]) { if (options.debug) std::cerr << "Validating..." << std::endl; if (!wasm::WasmValidator().validate(wasm, Feature::All, WasmValidator::Globally | (options.extra["validate"] == "web" ? WasmValidator::Web : 0))) { + WasmPrinter::printModule(&wasm); Fatal() << "Error: input module is not valid.\n"; } } -- cgit v1.2.3