Repository navigation
testing: Fuzz corpus header should support CRLF line endings #52268
Description
Activity
I think this is the wrong place to fix things,
testdata/can contain arbitrary data and letting git mess with them can cause all sorts of issues (eg CRLFs in golden files). There are per repo settings available via.gitattributes, which can and should be set.Reacted by Dmitri Shuralyov and Tiago Cesar KatcipisAlso, if CRLF will not be supported, the corpus file format documentation should make that explicit.
CC @golang/fuzzing.
- addedNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
on Apr 11, 2022 My two cents: Yes, letting git mess with
testdatacan be bad, but for the large majority of users, it isn't, and fuzzing is the first instance of it being bad. Seeing that the format could trivially support CRLF, and seeing how this issue will affect every multi-OS user of fuzzing, I think this should be fixed in Go. It's an easy fix that helps a lot of users and makes fuzz testdata work automatically, without having to learn about git mechanisms.It's also in line with the rest of the Go toolchain, which supports CRLF line endings well.
Reacted by Daniel Martí, Dmitri Shuralyov, Cameron Moore, Thomas Pelletier and Tiago Cesar KatcipisChange https://go.dev/cl/402074 mentions this issue:
internal/fuzz: trim carriage return from version line+1
I missed this issue because I searched for issues with the "fuzz" tag, but I also ran into problems when testing things on multiple OS's on GHA. More details here.
- addedfuzzIssues related to native fuzzing supportIssues related to native fuzzing support
on May 20, 2022 - addedNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.and removedNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
on May 21, 2022 - locked and limited conversation to collaborators
on May 21, 2023 - added a commit that references this issue
on Sep 19, 2024
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNo status
What version of Go are you using (
go version)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env)?go envOutputWhat did you do?
Checkout a Go project with a fuzzing corpus and begin fuzzing:
What did you expect to see?
I expected the fuzzer to startup successfully and begin fuzzing.
What did you see instead?
Root Cause
The issue is that the corpus file format must use LF line endings. Git was "helpfully" converting everything to CRLF by default on Windows. In order to use the fuzzer, the Git config must contain
core.autocrlf=falseandcore.eol=lf.