summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2018-02-11 14:02:02 -0800
committerGitHub <noreply@github.com>2018-02-11 14:02:02 -0800
commitea9b66b204fb4aa59227e677298c1e524b961bf3 (patch)
treeb1d0a2b1a5fcd5eb7cfad835915501daa49e89f5 /src
parent1a85018da5fb6fdd8efdbec4685a4dfab1698e93 (diff)
downloadbinaryen-ea9b66b204fb4aa59227e677298c1e524b961bf3.tar.gz
binaryen-ea9b66b204fb4aa59227e677298c1e524b961bf3.tar.bz2
binaryen-ea9b66b204fb4aa59227e677298c1e524b961bf3.zip
remove recursion-avoiding code in fuzzer, now that we have hang prevention it's useful to test infinite loops (#1404)
Diffstat (limited to 'src')
-rw-r--r--src/tools/fuzzing.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/tools/fuzzing.h b/src/tools/fuzzing.h
index d90660e89..a4c4e054b 100644
--- a/src/tools/fuzzing.h
+++ b/src/tools/fuzzing.h
@@ -151,9 +151,6 @@ private:
// beyond a nesting limit, greatly decrease the chance to continue to nest
static const int NESTING_LIMIT = 11;
- // reduce the chance for a function to call itself by this factor
- static const int RECURSION_FACTOR = 10;
-
// the maximum size of a block
static const int BLOCK_FACTOR = 5;
@@ -774,8 +771,6 @@ private:
target = vectorPick(wasm.functions).get();
}
if (target->result != type) continue;
- // reduce the odds of recursion dramatically, to limit infinite loops
- if (target == func && !oneIn(RECURSION_FACTOR * TRIES)) continue;
// we found one!
std::vector<Expression*> args;
for (auto argType : target->params) {