-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
FrozenDueToAgeNeedsFixThe 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.fuzzIssues related to native fuzzing supportIssues related to native fuzzing support
Milestone
Description
What version of Go are you using (go version)?
$ go version go version go1.18 windows/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env set GO111MODULE= set GOARCH=amd64 set GOBIN= set GOCACHE=C:\Users\XXX\AppData\Local\go-build set GOENV=C:\Users\XXX\AppData\Roaming\go\env set GOEXE=.exe set GOEXPERIMENT= set GOFLAGS= set GOHOSTARCH=amd64 set GOHOSTOS=windows set GOINSECURE= set GOMODCACHE=C:\Users\XXX\go\pkg\mod set GONOPROXY= set GONOSUMDB= set GOOS=windows set GOPATH=C:\Users\XXX\go set GOPRIVATE= set GOPROXY=https://proxy.golang.org,direct set GOROOT=C:\Program Files\Go set GOSUMDB=sum.golang.org set GOTMPDIR= set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64 set GOVCS= set GOVERSION=go1.18 set GCCGO=gccgo set GOAMD64=v1 set AR=ar set CC=gcc set CXX=g++ set CGO_ENABLED=1 set GOMOD=C:\Users\XXX\src\github.com\pelletier\go-toml\go.mod set GOWORK= set CGO_CFLAGS=-g -O2 set CGO_CPPFLAGS= set CGO_CXXFLAGS=-g -O2 set CGO_FFLAGS=-g -O2 set CGO_LDFLAGS=-g -O2 set PKG_CONFIG=pkg-config set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\XXX\AppData\Local\Temp\go-build3190186843=/tmp/go-build -gno-record-gcc-switches
What did you do?
Checkout a Go project with a fuzzing corpus and begin fuzzing:
git clone https://github.com/pelletier/go-toml.git
cd ./go-toml
checkout fixes
go test -fuzz FuzzUnmarshal
What did you expect to see?
I expected the fuzzer to startup successfully and begin fuzzing.
What did you see instead?
--- FAIL: FuzzUnmarshal (0.04s)
fuzz_test.go:22: "testdata\\fuzz\\FuzzUnmarshal\\0c08b924aa26af23d16b77029b4f5567a96af93402e0472fef7b837b37580d7c": unmarshal: unknown encoding version: go test fuzz v1
"testdata\\fuzz\\FuzzUnmarshal\\249a017d8ffa0d88d41c594ada5399f764833f64050180cb39f106d12666853f": unmarshal: unknown encoding version: go test fuzz v1
"testdata\\fuzz\\FuzzUnmarshal\\391ce67b866d58464d067c5981e99951fd499896453a2fe2779a6bfe7df11bf5": unmarshal: unknown encoding version: go test fuzz v1
"testdata\\fuzz\\FuzzUnmarshal\\49ae83283c5cfbed874bcacbfb342de107b69c2a3d3c35c2d99f67345fe89946": unmarshal: unknown encoding version: go test fuzz v1
"testdata\\fuzz\\FuzzUnmarshal\\69ea82e85bb4ad966ae86bb05eea3af69ed1a826c846f1bf2282f329b4d8fb36": unmarshal: unknown encoding version: go test fuzz v1
"testdata\\fuzz\\FuzzUnmarshal\\746910fac6deb42e7e62dce60b333c81c39d844a122c9075894c023400e8fdbf": unmarshal: unknown encoding version: go test fuzz v1
"testdata\\fuzz\\FuzzUnmarshal\\844d1171a3adc95e51627f0e9378bbaa193fe2d0284f4ba8ed19a5226a8cbc74": unmarshal: unknown encoding version: go test fuzz v1
"testdata\\fuzz\\FuzzUnmarshal\\900c54b5071113ae2a5365b3156377ddd775b9d38add61629544903cb9c94b00": unmarshal: unknown encoding version: go test fuzz v1
"testdata\\fuzz\\FuzzUnmarshal\\c87e8eb4e8fa40fd3c89d8ed16a049ce81592ded710965ee29a4e506eb5427b3": unmarshal: unknown encoding version: go test fuzz v1
"testdata\\fuzz\\FuzzUnmarshal\\d0e5d6fc3b865cfae5480c01f301b87c932722ae0c1d692deea413349ea028be": unmarshal: unknown encoding version: go test fuzz v1
"testdata\\fuzz\\FuzzUnmarshal\\d2cecea5b8ee5f148419671cef0644178cdba1ee91d3f295be38da576e89ef40": unmarshal: unknown encoding version: go test fuzz v1
FAIL
exit status 1
FAIL github.com/pelletier/go-toml/v2 0.455s
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=false and core.eol=lf.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe 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.fuzzIssues related to native fuzzing supportIssues related to native fuzzing support
Type
Projects
Status
No status