We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
go version
$ go version go version go1.11.2 linux/amd64
yes
go env
$ go env GOARCH="amd64" GOBIN="/home/mikolaj/go/bin" GOCACHE="/home/mikolaj/.cache/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/mikolaj/go" GOPROXY="" GORACE="" GOROOT="/usr/lib/go" GOTMPDIR="" GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build664414908=/tmp/go-build -gno-record-gcc-switches"
fastwalk.direntNamlen() crashes while producing a long filename (e.g., 255 characters).
fastwalk.direntNamlen()
not to crash
panic: runtime error: slice bounds out of range [recovered] panic: runtime error: slice bounds out of range goroutine 5 [running]: testing.tRunner.func1(0xc0000ae100) /usr/lib/go/src/testing/testing.go:792 +0x387 panic(0x51db00, 0x62dff0) /usr/lib/go/src/runtime/panic.go:513 +0x1b9 golang.org/x/tools/internal/fastwalk.direntNamlen(0xc0000bff00, 0x0) /home/mikolaj/go/src/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_namlen_linux.go:19 +0x96 golang.org/x/tools/internal/fastwalk.parseDirEnt(0xc0000bff00, 0x118, 0x1fb0, 0x7, 0xc000000000, 0x0, 0x0) /home/mikolaj/go/src/golang.org/x/tools/internal/fastwalk/fastwalk_unix.go:116 +0x94 golang.org/x/tools/internal/fastwalk.readDir(0x5439c6, 0x6, 0xc0000c1f20, 0x0, 0x0) /home/mikolaj/go/src/golang.org/x/tools/internal/fastwalk/fastwalk_unix.go:46 +0x14c golang.org/x/tools/internal/fastwalk.(*walker).walk(0xc000070300, 0x5439c6, 0x6, 0x9406d00, 0x9406d81005f6818, 0x5be70f07) /home/mikolaj/go/src/golang.org/x/tools/internal/fastwalk/fastwalk.go:195 +0x6a golang.org/x/tools/internal/fastwalk.TestOnSomething(0xc0000ae100) /home/mikolaj/go/src/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_namlen_linux_test.go:21 +0x14b testing.tRunner(0xc0000ae100, 0x54c948) /usr/lib/go/src/testing/testing.go:827 +0xbf created by testing.(*T).Run /usr/lib/go/src/testing/testing.go:878 +0x353
The text was updated successfully, but these errors were encountered:
See https://golang.org/cl/148884
Sorry, something went wrong.
Change https://golang.org/cl/148884 mentions this issue: internal/fastwalk: avoids slice bounds out of range for long file names
internal/fastwalk: avoids slice bounds out of range for long file names
golang/tools@5f9a541
No branches or pull requests
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 env
OutputWhat did you do?
fastwalk.direntNamlen()
crashes while producing a long filename (e.g., 255 characters).What did you expect to see?
not to crash
What did you see instead?
The text was updated successfully, but these errors were encountered: