summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2018-01-03 10:42:10 -0800
committerGitHub <noreply@github.com>2018-01-03 10:42:10 -0800
commit5aee9479ca2839f5d3baf4dc34f0b6f1dec19fe3 (patch)
treefb92d889eaa875f95127d642da6587d449d90f94 /src
parent593178a3e207e5382338fbf05adce419fe9545fd (diff)
downloadbinaryen-5aee9479ca2839f5d3baf4dc34f0b6f1dec19fe3.tar.gz
binaryen-5aee9479ca2839f5d3baf4dc34f0b6f1dec19fe3.tar.bz2
binaryen-5aee9479ca2839f5d3baf4dc34f0b6f1dec19fe3.zip
fix an infinite loop in fuzz testcase generation code (#1345)
Diffstat (limited to 'src')
-rw-r--r--src/tools/fuzzing.h2
1 files changed, 1 insertions, 1 deletions
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<Expression*> invocations;
- while (oneIn(2)) {
+ while (oneIn(2) && !finishedInput) {
std::vector<Expression*> args;
for (auto type : func->params) {
args.push_back(makeConst(type));