-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
syscall: unable to use the full length for abstract socket starting with null #70893
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
Comments
Sure, send a patch. Thanks. |
Change https://go.dev/cl/637335 mentions this issue: |
Change https://go.dev/cl/650875 mentions this issue: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsFix
The path to resolution is known, but the work has not been done.
Go version
go version go1.23.3 linux/amd64
Output of
go env
in your module/workspace:What did you do?
https://go.dev/play/p/Lro4QrH5-BK
What did you see happen?
padded addr1 (@begins-with-at) with length: 108
padded addr2 (begins-with-null) with length: 108
panic: listen unix begins-with-null: bind: invalid argument
goroutine 1 [running]:
main.main()
/tmp/sandbox3694864181/prog.go:27 +0x294
What did you expect to see?
both address (beginning with
@
andnull or 0
) should be useable to specify abstract unix domain socket with length of 108 (full path length)the issue seems to be this line of code that checks for
@
for abstract domain socket but not for0
https://github.com/golang/go/blob/master/src/syscall/syscall_linux.go#L557
considering how the next part of the code checks for
0 and sl > 3
https://github.com/golang/go/blob/master/src/syscall/syscall_linux.go#L569I would expect that specifying
0
to indicate it's a domain socket to be a valid way of doing solet me know if this is something that should be fixed, I would be more than happy to create a PR. Thanks!
The text was updated successfully, but these errors were encountered: