]> Cypherpunks repositories - gostls13.git/commitdiff
internal/fuzz: tiny refactor+fix
authorKatie Hockman <katie@golang.org>
Fri, 22 Oct 2021 15:37:28 +0000 (11:37 -0400)
committerKatie Hockman <katie@golang.org>
Tue, 26 Oct 2021 19:04:53 +0000 (19:04 +0000)
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>

src/internal/fuzz/fuzz.go
src/internal/fuzz/worker.go

index 5b3819be752c6cc33cde8ead940d30d17005ce2e..5008927f0e47c8a8d9b1d8fb224d8440677c12e7 100644 (file)
@@ -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
index e3827b112a88dd18ea06c8982b9a72bf0579b0ec..b36ebe2a7ee9a08c0c2713f9afd51b23f1f032e0 100644 (file)
@@ -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()))
                        }
                }