summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tools/fuzzing.h2
-rw-r--r--test/passes/translate-to-fuzz.txt24
2 files changed, 4 insertions, 22 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));
diff --git a/test/passes/translate-to-fuzz.txt b/test/passes/translate-to-fuzz.txt
index 0bcb215f6..4df3f08ca 100644
--- a/test/passes/translate-to-fuzz.txt
+++ b/test/passes/translate-to-fuzz.txt
@@ -19,7 +19,6 @@
(export "func_4" (func $func_4))
(export "func_6" (func $func_6))
(export "func_6_invoker" (func $func_6_invoker))
- (export "func_9_invoker" (func $func_9_invoker))
(export "hangLimitInitializer" (func $hangLimitInitializer))
(func $func_0 (; 0 ;) (type $FUNCSIG$i) (result i32)
(local $0 i32)
@@ -1365,29 +1364,12 @@
)
)
)
- (func $func_9_invoker (; 10 ;) (type $FUNCSIG$v)
- (drop
- (call $func_9
- (i32.const -120)
- )
- )
- (drop
- (call $func_9
- (i32.const 11571)
- )
- )
- (drop
- (call $func_9
- (i32.const -1)
- )
- )
- )
- (func $hangLimitInitializer (; 11 ;)
+ (func $hangLimitInitializer (; 10 ;)
(set_global $hangLimit
(i32.const 10)
)
)
- (func $deNan32 (; 12 ;) (param $0 f32) (result f32)
+ (func $deNan32 (; 11 ;) (param $0 f32) (result f32)
(if (result f32)
(f32.eq
(get_local $0)
@@ -1397,7 +1379,7 @@
(f32.const 0)
)
)
- (func $deNan64 (; 13 ;) (param $0 f64) (result f64)
+ (func $deNan64 (; 12 ;) (param $0 f64) (result f64)
(if (result f64)
(f64.eq
(get_local $0)