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

cmd/go: fuzz corpus files should end in newline #48130

Closed
rsc opened this issue Sep 2, 2021 · 1 comment
Closed

cmd/go: fuzz corpus files should end in newline #48130

rsc opened this issue Sep 2, 2021 · 1 comment
Labels
FrozenDueToAge fuzz Issues related to native fuzzing support NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Sep 2, 2021

The corpus files written by go test -fuzz look like:

go test fuzz v1
string("A")

it's a great format, but what you can't see above is that they have no final \n on the last line. They should.

/cc @jayconrod @katiehockman

@rsc rsc added NeedsFix The path to resolution is known, but the work has not been done. release-blocker labels Sep 2, 2021
@rsc rsc added this to the Go1.18 milestone Sep 2, 2021
@jayconrod jayconrod added the fuzz Issues related to native fuzzing support label Sep 9, 2021
@katiehockman katiehockman self-assigned this Sep 10, 2021
@gopherbot
Copy link

Change https://golang.org/cl/349055 mentions this issue: [dev.fuzz] internal/fuzz: write a newline to the end of a corpus file

gopherbot pushed a commit that referenced this issue Sep 10, 2021
If someone manually adds/alters a corpus file to add
extra spacing or remove the final newline, the file
can still be decoded. However, this change ensures that
the fuzzing engine correctly writes the final newline.

Fixes #48130

Change-Id: Ib5556d4a6e4e0bfd9bc2edab357b7c25bedfd176
Reviewed-on: https://go-review.googlesource.com/c/go/+/349055
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>
@golang golang locked and limited conversation to collaborators Jun 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge fuzz Issues related to native fuzzing support NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Projects
Status: No status
Development

No branches or pull requests

4 participants