You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This problem has been reported before in issue #945 and issue #3875. Each time, a related
problem was solved, but the previous fixes did not solve this exact problem.
What steps will reproduce the problem?
1. http://play.golang.org/p/VUAfi_vznp
(cannot be run on play due to need for socket access)
What is the expected output?
n: 5, addr: <nil>, err: <nil>, buf: []byte{0x1, 0x2, 0x3, 0x4, 0x5}
What do you see instead?
n: 0, addr: <nil>, err: read unixgram /tmp/sname: address family not supported by
protocol, buf: []byte{}
But strace -f sees this:
[pid 9818] recvfrom(3, "\1\2\3\4\5", 1024, 0, {sa_family=AF_UNSPEC,
sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, [0]) = 5
So there are 5 bytes received that should make it out of ReadFrom, but are lost.
The problem is in syscall.Recvfrom, when anyToSockaddr is called after the kernel told
us the data at &rsa is invalid by setting len to 0.
(man 2 recvfrom: "The argument addrlen is a value-result argument, which the
caller should initialize before the call to the size of the buffer associated with
src_addr, and modified on return to indicate the actual size of the source
address.")
A CL is forthcoming, needs testing on other OSes.
Which compiler are you using (5g, 6g, 8g, gccgo)?
6g
Which operating system are you using?
Linux
Which version are you using? (run 'go version')
go version devel 08a1396e9aa7 Tue Jan 08 17:23:46 2013 +1100 linux/amd64
The text was updated successfully, but these errors were encountered:
by jeff.allen:
The text was updated successfully, but these errors were encountered: