From 1dc77a38d293763b9de50110dd72edd755ce72b7 Mon Sep 17 00:00:00 2001 From: Katie Hockman Date: Fri, 22 Oct 2021 11:37:28 -0400 Subject: [PATCH] internal/fuzz: tiny refactor+fix Change-Id: I8db9c31ead3e5905b7f9d1faed36555e8aaa00cd Reviewed-on: https://go-review.googlesource.com/c/go/+/358054 Trust: Katie Hockman Run-TryBot: Katie Hockman Reviewed-by: Julie Qiu TryBot-Result: Go Bot --- src/internal/fuzz/fuzz.go | 2 +- src/internal/fuzz/worker.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/internal/fuzz/fuzz.go b/src/internal/fuzz/fuzz.go index 5b3819be752..5008927f0e4 100644 --- a/src/internal/fuzz/fuzz.go +++ b/src/internal/fuzz/fuzz.go @@ -702,7 +702,7 @@ func (c *coordinator) logStats() { interestingTotalCount := int64(c.warmupInputCount-len(c.opts.Seed)) + c.interestingCount fmt.Fprintf(c.opts.Log, "fuzz: elapsed: %s, execs: %d (%.0f/sec), new interesting: %d (total: %d)\n", c.elapsed(), c.count, rate, c.interestingCount, interestingTotalCount) } else { - fmt.Fprintf(c.opts.Log, "fuzz: elapsed: %s, execs: %d (%.0f/sec)", c.elapsed(), c.count, rate) + fmt.Fprintf(c.opts.Log, "fuzz: elapsed: %s, execs: %d (%.0f/sec)\n", c.elapsed(), c.count, rate) } } c.countLastLog = c.count diff --git a/src/internal/fuzz/worker.go b/src/internal/fuzz/worker.go index e3827b112a8..b36ebe2a7ee 100644 --- a/src/internal/fuzz/worker.go +++ b/src/internal/fuzz/worker.go @@ -1088,7 +1088,7 @@ func (wc *workerClient) fuzz(ctx context.Context, entryIn CorpusEntry, args fuzz wc.m.r.restore(mem.header().randState, mem.header().randInc) if !args.Warmup { // Only mutate the valuesOut if fuzzing actually occurred. - for i := int64(0); i < mem.header().count; i++ { + for i := int64(0); i < resp.Count; i++ { wc.m.mutate(valuesOut, cap(mem.valueRef())) } }