Closed
Description
What version of Go are you using (go version
)?
$ go version go version go1.21.3 linux/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 GO111MODULE='' GOARCH='amd64' GOBIN='' GOCACHE='/home/x/.cache/go-build' GOENV='/home/x/.config/go/env' GOEXE='' GOEXPERIMENT='' GOFLAGS='' GOHOSTARCH='amd64' GOHOSTOS='linux' GOINSECURE='' GOMODCACHE='/home/x/go/pkg/mod' GONOPROXY='' GONOSUMDB='' GOOS='linux' GOPATH='/home/x/go' GOPRIVATE='' GOPROXY='https://proxy.golang.org,direct' GOROOT='/usr/local/go' GOSUMDB='sum.golang.org' GOTMPDIR='' GOTOOLCHAIN='auto' GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64' GOVCS='' GOVERSION='go1.21.3' GCCGO='gccgo' GOAMD64='v1' AR='ar' CC='gcc' CXX='g++' CGO_ENABLED='1' GOMOD='/dev/null' GOWORK='' CGO_CFLAGS='-O2 -g' CGO_CPPFLAGS='' CGO_CXXFLAGS='-O2 -g' CGO_FFLAGS='-O2 -g' CGO_LDFLAGS='-O2 -g' PKG_CONFIG='pkg-config' GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build3291950043=/tmp/go-build -gno-record-gcc-switches'
What did you do?
https://go.dev/play/p/QzrhBGKYhJc
What did you expect to see?
Num RefCount Protocol Flags Type St Inode Path
0000000000000000: 00000001 00000000 00010000 0001 01 1 @begins-with-null-1
0000000000000000: 00000001 00000000 00010000 0001 01 2 @begins-with-at-1
0000000000000000: 00000001 00000000 00010000 0001 01 3 @begins-with-null-2
0000000000000000: 00000001 00000000 00010000 0001 01 4 @begins-with-at-2
What did you see instead?
Num RefCount Protocol Flags Type St Inode Path
0000000000000000: 00000001 00000000 00010000 0001 01 1 @begins-with-null-1\x0
0000000000000000: 00000001 00000000 00010000 0001 01 2 @begins-with-at-1
0000000000000000: 00000001 00000000 00010000 0001 01 3 @begins-with-null-2\x0
0000000000000000: 00000001 00000000 00010000 0001 01 4 @begins-with-at-2
In the syscall file there is code that special-cases handling of unix socket names beginning with @
by removing the trailing NUL character but it does not do the same for unix socket names starting with the NUL character.
It seems obvious to me that this is just a simple oversight and the fix is very simple. Lemme just make a PR...
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done