Repository navigation
Conversation
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
The overlap table lists no shared export and no shared new file for any of these pull requests, so none of them implements this behaviour: the co-touches are textual. The change is in the Issue #8681 was worked on by PR #8682, which was closed on 2026-10-21 after a review that asked for the IPv6 case. This branch covers that case, and adds a never-associated socket and a socket bound to an explicit port. It does not depend on any open pull request. |
|
Second platform, since upstream merges pull requests that report both. Ubuntu 24.04.3 (GCC 13.3.0, CMake 3.28.3, Ninja 1.11.1, WSL2): The change only affects the address A contributor's independent run on a second machine appears to help a pull request along, so this is offered the same way. |
|
Windows run of 555a9e5 merged onto Built |
555a9e5 to
cc1f42c
Compare
|
Rebased onto the current |
jotitadev
left a comment
There was a problem hiding this comment.
Linux run of the current change, since the description only lists Windows. Head cc1f42ccd (a rebase of 555a9e5b9 onto newer main; the diff for Udp.cpp and GuestUdp.cpp is identical).
Machine: Linux x86_64, i7-8700 (6 cores / 12 threads), Ubuntu 26.04, GCC 15.2, Release, BUILD_TESTING=ON, full build. Validated at 555a9e5b9 merged onto main 0c6a5bd59.
- Build ok.
guest_udppasses with the change. - Restoring
Socket/src/Udp.cpptomainand keeping the test abortsguest_udp(SIGABRT at the wildcard-address assertion), so the test covers the change.
Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
|
Rebased onto Windows 11 26200, WinLibs GCC 15.2.0 r7 (posix-seh-ucrt), Release: Ubuntu 24.04.3, GCC 13.3.0, CMake 3.28.3, Ninja 1.11.1:
AI-assisted (Claude Code). |
…tion is dissolved FreeBSD 11.4's udp_disconnect resets the local address to the wildcard address and keeps the port. The host socket keeps the address it was bound to, so getsockname reported 127.0.0.1 on Windows and on Linux for a socket bound to an explicit port. The socket now remembers that its association was dissolved and getsockname reports the wildcard address for IPv4 and IPv6 until the next bind or connect.
cc1f42c to
e4e7b9c
Compare
|
Rebased onto |
|
About the relation to #8921, which documents the same That is the host's behaviour, not the console's. FreeBSD 11.4's in_pcbdisconnect(inp);
inp->inp_laddr.s_addr = INADDR_ANY;The local address is reset to the wildcard whatever the socket was bound to, and only the port is kept. The other half of #8921's sentence says the same — "where FreeBSD 11.4's So this pull request makes What the host socket still does is unchanged: the socket keeps the address it was bound to, so it still receives only what that address delivers and a The change is in |
MarcZX10
left a comment
There was a problem hiding this comment.
I reviewed the prior resolution of this same behavior in #8682. After the author measured that an explicitly bound Winsock socket remains bound to 127.0.0.1 and sendto to a LAN address still fails after the disconnect, the collaborator closed that PR and asked for a documentation-only debt update unless a title requiring the behavior is identified. The author said no such title was known. See the maintainer resolution and the author's measurement and agreement.
This PR reintroduces the same mismatch: Disconnect sets localAddressCleared, and getsockname zeros the reported address, while the host socket remains bound to its original address. The new tests assert the reported name but do not check that send/receive behavior now matches a wildcard-bound socket. The PR names no title (Unblocks: none) and explicitly says the host socket is unchanged. The IPv6 coverage improves the test matrix but does not resolve this semantic blocker. Please convert this to the docs-only debt update requested in #8682, or provide a specific title and measured call sequence that requires this behavior together with an implementation that keeps the host socket semantics consistent. Keep #8681 open unless the full behavior is resolved; Fixes #8681 is not supported by the current code.
There are also required queue updates:
- Current
mainisd6732b51a64f; this head is 91 commits behind it. Please rebase and rerun the conventions and overlap checks. - The refreshed overlap scan finds active UDP/debt overlaps with #8344, #8499, #8921, #9105, #9108 and #9169, plus #7511/#8448 in the debt entry. It could not compare the
GuestUdp.cppchanges with #6044. Please coordinate the affected hunks and update the merge-order/Depends onchecklist after rebase. In particular, #8921 is the existing docs-only treatment requested by the #8682 resolution.
I configured and built guest_udp_tests from this head successfully. guest_udp could not execute on this host: startup aborts because the CPU lacks LZCNT, BMI1/2, MOVBE, AVX2 and FMA. I did not count that as a test pass. tools/check_conventions.py --base upstream/main passes, as does git diff --check. The reported Windows and WSL2 runs are useful; only Conventions and PR labels are present and green in this head's hosted checks, with no hosted build/test result shown.
|
The change is already integrated on the agent/integration line as c681bcf, with the same three files (core/libs/prx/libkernel/Socket/src/Udp.cpp, core/libs/tests/GuestUdp.cpp, docs/dev/debt/libkernel.md). Closing this to free the single open pull request the account limit allows, so #9649 can carry the libSceIcu, libSceNpCommon and libSceXml work. |
|
Reopening this. The account has one open pull request until its first merge ( |
|
Closing: this implements the behaviour that was settled in #8682.
A docs-only PR that records the FreeBSD |
What
getsocknameon a UDP socket reported the old local address after the association was dissolved.connect(s, AF_UNSPEC)resets the local address to the wildcard address on the console, keeping the port; AnyPS5 kept reporting the address the socket was bound to.FreeBSD 11.4's
udp_disconnect(sys/netinet/udp_usrreq.c) doesinp->inp_laddr.s_addr = INADDR_ANY;and leavesinp->inp_lportuntouched, so the local address becomes the wildcard and the port is kept, on every host.No portable host call produces that. Linux's
connect(AF_UNSPEC)resets the local address only when the socket was not explicitly bound (SOCK_BINDADDR_LOCK), and a bound socket cannot be bound again (EBUSY); Windows keeps the address unconditionally. The socket now records that its association was dissolved andgetsocknamereports the wildcard address (IPv4 and IPv6) until the nextbindorconnect.The host socket keeps the address it was bound to, so it still receives only what that address delivers, where the console's socket, whose local address is the wildcard address, receives on any address of its port. That difference stays recorded in the technical debt.
core/libs/prx/libkernel/Socket/src/Udp.cpp,core/libs/tests/GuestUdp.cpp,docs/dev/debt/libkernel.md.Tested
Windows 11 26200, WinLibs MinGW-w64 GCC 15.2.0 r7 (posix-seh-ucrt), CMake + Ninja, Release,
-DBUILD_TESTING=ON.guest_udppasses with the change. RevertingUdp.cppto its state onmainand rebuilding makes it fail: the check aborts at the wildcard-address assertion (Exit code 0xc0000409), while the assertions before it pass, so the map succeeded and only the reported address was stale.guest_udp,guest_socket*,guest_poll,guest_tcp,guest_socket_host_write_*.python3 tools/check_conventions.py --base origin/mainreports no errors.Ubuntu 24.04.3, GCC 13.3.0, CMake 3.28.3, Ninja 1.11.1:
guest_udppasses, and the relinker-only suite is 239/239 on that host. The change only affects the addressgetsocknamereports, and the host socket's own binding is left alone, so the host behaviour is unchanged on every platform.The
guest_udpcoverage now runs on Windows as well as Linux. It adds the never-associated case (a socket that was never associated keeps its bound address), the explicit-port case the report names, and the IPv6 case.Overlap:
tools/pr_overlap.pyreports no shared export and no shared new file. The pull requests it lists shareUdp.cppanddocs/dev/debt/libkernel.mdon other lines; the change is in theSocketmember,Disconnect,connect,bindandgetsockname, which none of them touches. PR #8682 implemented the same behaviour for this issue and was closed on 2026-10-21 after a review that asked for the IPv6 case; this branch covers that case, and adds the never-associated and explicit-port cases. It does not depend on any open pull request.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)