aboutsummaryrefslogtreecommitdiff
path: root/src/internal
diff options
context:
space:
mode:
authorKatie Hockman <katie@golang.org>2021-10-22 11:37:28 -0400
committerKatie Hockman <katie@golang.org>2021-10-26 19:04:53 +0000
commit1dc77a38d293763b9de50110dd72edd755ce72b7 (patch)
tree2193bc392249890e74a35a55839de03da155a9b8 /src/internal
parent76cef81bcff371c88d277f17c712ecf22b8c83e7 (diff)
downloadgo-1dc77a38d293763b9de50110dd72edd755ce72b7.tar.gz
go-1dc77a38d293763b9de50110dd72edd755ce72b7.zip
internal/fuzz: tiny refactor+fix
Change-Id: I8db9c31ead3e5905b7f9d1faed36555e8aaa00cd Reviewed-on: https://go-review.googlesource.com/c/go/+/358054 Trust: Katie Hockman <katie@golang.org> Run-TryBot: Katie Hockman <katie@golang.org> Reviewed-by: Julie Qiu <julie@golang.org> TryBot-Result: Go Bot <gobot@golang.org>
Diffstat (limited to 'src/internal')
-rw-r--r--src/internal/fuzz/fuzz.go2
-rw-r--r--src/internal/fuzz/worker.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/internal/fuzz/fuzz.go b/src/internal/fuzz/fuzz.go
index 5b3819be75..5008927f0e 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 e3827b112a..b36ebe2a7e 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()))
}
}