1
0
mirror of https://github.com/golang/go synced 2024-11-17 05:54:46 -07:00

[dev.fuzz] internal/fuzz: warn if fuzzing begins with empty corpus

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>
This commit is contained in:
Katie Hockman 2021-09-16 10:34:46 -04:00
parent 5ed7dd0650
commit 5e9c1fedb6

View 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))