aboutsummaryrefslogtreecommitdiff
path: root/src/syscall
diff options
context:
space:
mode:
authorAchille Roussel <achille.roussel@gmail.com>2023-06-10 11:31:43 -0700
committerGopher Robot <gobot@golang.org>2023-06-14 01:36:27 +0000
commitc3db64c0f45e8f2d75c5b59401e0fc925701b6f4 (patch)
tree766bc81e500dc892135bba53182834fd22968165 /src/syscall
parent711ef8bc725037e95ad78ce61b8679fdd2657897 (diff)
downloadgo-c3db64c0f45e8f2d75c5b59401e0fc925701b6f4.tar.xz
net: fix panic when calling net.Listen or net.Dial on wasip1
Address a panic that was caused by net.Dial/net.Listen entering the fake network stack and assuming that the addresses would be of type *TCPAddr, where in fact they could have been *UDPAddr or *UnixAddr as well. The fix consist in implementing the fake network facility for udp and unix addresses, preventing the assumed type assertion to TCPAddr from triggering a panic. New tests are added to verify that using the fake network from the exported functions of the net package satisfies the minimal requirement of being able to create a listener and establish a connection for all the supported network types. Fixes #60012 Fixes #60739 Change-Id: I2688f1a0a7c6c9894ad3d137a5d311192c77a9b2 Reviewed-on: https://go-review.googlesource.com/c/go/+/502315 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Diffstat (limited to 'src/syscall')
0 files changed, 0 insertions, 0 deletions