]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.fuzz] internal/fuzz: improve warning message when not instrumented
authorKatie Hockman <katie@golang.org>
Fri, 10 Sep 2021 13:49:03 +0000 (09:49 -0400)
committerKatie Hockman <katie@golang.org>
Fri, 10 Sep 2021 15:20:38 +0000 (15:20 +0000)
Change-Id: I005f66c965014b699de7e22750f417b28a32c03f
Reviewed-on: https://go-review.googlesource.com/c/go/+/349052
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/internal/fuzz/fuzz.go

index f36569b4cc595d47d1ec72b57501f43668e3ccad..6c07da2dbe43de96b24261ca5ec09d5e7efb5c5a 100644 (file)
@@ -613,11 +613,7 @@ func newCoordinator(opts CoordinateFuzzingOpts) (*coordinator, error) {
 
        covSize := len(coverage())
        if covSize == 0 {
-               // TODO: improve this warning. This condition happens if the binary was
-               // built without fuzzing instrumtation (e.g., with 'go test -c'), so the
-               // warning may not be true.
-               fmt.Fprintf(c.opts.Log, "warning: coverage-guided fuzzing is not supported on this platform\n")
-               c.covOnlyInputs = 0
+               fmt.Fprintf(c.opts.Log, "warning: the test binary was not built with coverage instrumentation, so fuzzing will run without coverage guidance and may be inefficient\n")
        } else {
                // Set c.coverageData to a clean []byte full of zeros.
                c.coverageMask = make([]byte, covSize)