Repository navigation
Conversation
10 tasks done
This was referenced Oct 13, 2026
xXPBSXx
force-pushed
the
fix/socket-create-errors-v2
branch
from
October 13, 2026 13:06
21277a7 to
e9152f4
Compare
10 tasks done
…rotocol 0 socket reported EPROTONOSUPPORT for every unknown type. FreeBSD 11.4's socreate returns EPROTOTYPE when no protocol matches a nonzero type and the protocol is 0, and EPROTONOSUPPORT when a protocol was given or the type is 0. SOCK_RAW stays EPROTONOSUPPORT, as raw sockets are not provided. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
xXPBSXx
force-pushed
the
fix/socket-create-errors-v2
branch
from
October 13, 2026 14:21
e9152f4 to
f53fea6
Compare
This was referenced Oct 13, 2026
Collaborator
|
Closing: no title is known to reach this. With the queue at 700+ open PRs, please hold off on new PRs that don't name a title needing the change until it's down. If a title stops on this on current main, reopen with the title ID and the log line. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
libkernel
socketansweredEPROTONOSUPPORT(43) for every socket type it does not provide. FreeBSD 11.4'ssocreatetells the cases apart when no protocol matches:EPROTOTYPE(41);EPROTONOSUPPORT(43);EAFNOSUPPORT(47), unchanged.socket(AF_INET, 99, 0)andsocket(AF_INET6, 99, 0)now fail with 41,socket(AF_INET, 99, 6)andsocket(AF_INET, 0, 0)stay 43. Every other type that is not 1, 2 or 3 with protocol 0 (4 and 5 as well) now answers 41; the test covers 99 only, and which of these types the console provides is not known.SOCK_RAWstays 43 because libkernel does not provide raw sockets (FreeBSD would create one or answerEPERM; listed as a new entry in the TechnicalDebt file for libkernel); a stream socket with the UDP protocol and a datagram socket with the TCP protocol stay 43, aspffindprotofinds no match and a protocol was given.No title evidence: found by writing failure-path tests for
socketfrom the FreeBSD source; no title I ran passes an unknown type. This is FreeBSD conformance. The same change for thesceNetSocketof libSceNet is part of #4989.Overlap (checked with
git merge-treeagainst the heads of #4796, #4920, #4922, #4929, #4968 and #4989): no conflict. The new test is registered next toguest_pollso it does not collide with the other test registrations in that file. #4933 (poll libSceNet sockets with the host wait) conflicts with this PR indocs/dev/debt/libkernel.md(git merge-treeof the two heads, re-checked); whichever lands second rebases the debt entry. #5510 (simonbronk, EPIPE for a stream send after the peer closed) conflicts with this PR indocs/dev/debt/libkernel.md(git merge-treeof the two heads, re-checked againstmaince5c83953; both heads are clean againstmain); whichever lands second rebases the debt entry.Tested
Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release, on
mainc2565f014; the code is unchanged since, the branch is one commit onmain0f2683cb7and adds a TechnicalDebt entry forSOCK_RAW;git merge-treeof the headf53fea6efagainstmainbf8dc610eis clean (checked, not rebuilt):guest_socket_create_errors(new) passes: unknown type with protocol 0 (41, onAF_INETandAF_INET6), unknown type with a protocol (43), type 0 (43), stream with the UDP protocol (43), datagram with the TCP protocol (43), unknown family (47), and valid sockets still created.Udp.cpp(an unknown type with protocol 0 must fail with EPROTOTYPE (41) (errno 43)).guest_socket*,guest_udp,guest_tcp,guest_sce_net,guest_poll,guest_dup,guest_select) pass.python tools/check_conventions.py --base upstream/mainpasses.main0f2683cb7:guest_socket_create_errorstakes 0.26 s (ctest, serial, Windows). The fullguest_*/ libc / libkernel group passes (391 of 391, 0 failed; the build also contains the other branches of this series).Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt (docs/dev/debt/libkernel.md).mdfiles or images added to the repositoryAI-assisted (Claude Code).
🤖 Generated with Claude Code