Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev.fuzz] cmd/go: print warning if fuzzing starts with no seed corpus #46219

Closed
katiehockman opened this issue May 18, 2021 · 1 comment
Closed

Comments

@katiehockman
Copy link
Member

@katiehockman katiehockman commented May 18, 2021

For users new to fuzzing, it may be common to write a fuzz target without any seed inputs.

func FuzzFoo(f *testing.F) {
  f.Fuzz(func(t *testing.T, b []byte) {
    Foo(b)
  })
}

When run without the -fuzz=FuzzFoo flag, this target won't do anything. We may consider printing a warning, something like "Starting fuzzing with an empty corpus" or something similar.

@katiehockman katiehockman added this to the Backlog milestone May 18, 2021
@katiehockman katiehockman changed the title [dev.fuzz]: print warning if fuzzing starts with no seed corpus [dev.fuzz] cmd/go: print warning if fuzzing starts with no seed corpus May 18, 2021
@katiehockman katiehockman removed this from the Backlog milestone Sep 14, 2021
@katiehockman katiehockman added this to the Go1.18 milestone Sep 14, 2021
@katiehockman katiehockman self-assigned this Sep 14, 2021
@gopherbot
Copy link

@gopherbot gopherbot commented Sep 16, 2021

Change https://golang.org/cl/350269 mentions this issue: [dev.fuzz] internal/fuzz: warn if fuzzing begins with empty corpus

gopherbot pushed a commit that referenced this issue Sep 20, 2021
Fixes #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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants