aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatie Hockman <katie@golang.org>2021-09-16 10:34:46 -0400
committerKatie Hockman <katie@golang.org>2021-09-20 16:59:51 +0000
commit5e9c1fedb69b405b75a0c499e2f32d35f294fd5c (patch)
tree8598f46bc5f97f9abb43e5a64781fbf1090ca0b2
parent5ed7dd0650cf32edd000d2268df961e2b825aab4 (diff)
downloadgo-5e9c1fedb69b405b75a0c499e2f32d35f294fd5c.tar.gz
go-5e9c1fedb69b405b75a0c499e2f32d35f294fd5c.zip
[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>
-rw-r--r--src/internal/fuzz/fuzz.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/internal/fuzz/fuzz.go b/src/internal/fuzz/fuzz.go
index 7343e17e44..99cf39e100 100644
--- a/src/internal/fuzz/fuzz.go
+++ b/src/internal/fuzz/fuzz.go
@@ -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))