]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.fuzz] internal/fuzz: warn if fuzzing begins with empty corpus
authorKatie Hockman <katie@golang.org>
Thu, 16 Sep 2021 14:34:46 +0000 (10:34 -0400)
committerKatie Hockman <katie@golang.org>
Mon, 20 Sep 2021 16:59:51 +0000 (16:59 +0000)
Fixes golang/go#46219

Change-Id: I7b32707d490c046d15324a3d297ec8d9f45b6e36
Reviewed-on: https://go-review.googlesource.com/c/go/+/350269
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/internal/fuzz/fuzz.go

index 7343e17e44c982141385bc3949c834ad555149cc..99cf39e10051d3fcd1ae1998ac6c9505cb23684a 100644 (file)
@@ -641,6 +641,7 @@ func newCoordinator(opts CoordinateFuzzingOpts) (*coordinator, error) {
        }
 
        if len(c.corpus.entries) == 0 {
+               fmt.Fprintf(c.opts.Log, "warning: starting with empty corpus\n")
                var vals []interface{}
                for _, t := range opts.Types {
                        vals = append(vals, zeroValue(t))