From 5aee9479ca2839f5d3baf4dc34f0b6f1dec19fe3 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 3 Jan 2018 10:42:10 -0800 Subject: fix an infinite loop in fuzz testcase generation code (#1345) --- src/tools/fuzzing.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tools/fuzzing.h') diff --git a/src/tools/fuzzing.h b/src/tools/fuzzing.h index baaaf1b23..74c1159c8 100644 --- a/src/tools/fuzzing.h +++ b/src/tools/fuzzing.h @@ -409,7 +409,7 @@ private: // the wasm, so they run everywhere void addInvocations(Function* func) { std::vector invocations; - while (oneIn(2)) { + while (oneIn(2) && !finishedInput) { std::vector args; for (auto type : func->params) { args.push_back(makeConst(type)); -- cgit v1.2.3