]> Cypherpunks repositories - gostls13.git/commitdiff
internal/fuzz: improve minimizing message
authorKatie Hockman <katie@golang.org>
Thu, 4 Nov 2021 17:55:31 +0000 (13:55 -0400)
committerKatie Hockman <katie@golang.org>
Thu, 4 Nov 2021 19:34:33 +0000 (19:34 +0000)
In order to know the actual number of bytes
of the entire corpus entry, the coordinator
would likely need to unmarshal the bytes and
tally up the length. That's more work than it
is worth, so this change just clarifies that
the printed # of bytes is the length of the
entire file, not just the entry itself.

Fixes #48989

Change-Id: I6fa0c0206a249cefdf6335040c560ec0c5a55b4a
Reviewed-on: https://go-review.googlesource.com/c/go/+/361414
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Katie Hockman <katie@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>

src/internal/fuzz/fuzz.go

index aef1dee9783a828bb43855828c00d8a28dfd6511..8bd40fe8bf9832e2de302884eede77bd727edda5 100644 (file)
@@ -246,7 +246,7 @@ func CoordinateFuzzing(ctx context.Context, opts CoordinateFuzzingOpts) (err err
                                        // Send it back to a worker for minimization. Disable inputC so
                                        // other workers don't continue fuzzing.
                                        c.crashMinimizing = &result
-                                       fmt.Fprintf(c.opts.Log, "fuzz: minimizing %d-byte crash input...\n", len(result.entry.Data))
+                                       fmt.Fprintf(c.opts.Log, "fuzz: minimizing %d-byte crash file\n", len(result.entry.Data))
                                        c.queueForMinimization(result, nil)
                                } else if !crashWritten {
                                        // Found a crasher that's either minimized or not minimizable.