Repository navigation
test(libkernel): audit listen socket backlog clamping and limit bounds - #16577
slopgobblercobbler wants to merge 1 commit into
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.
|
|
Windows check of head Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release.
Every backlog value on the first, bound, listener passes, including So this is a real Windows behaviour gap rather than a test problem, assuming the console accepts AI-assisted: yes. |
|
The library side of the Rerun of
AI-assisted: yes. |
f9f6929 to
18d2a23
Compare
|
Windows recheck of the force-pushed head Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release. The The socket is a stream socket that was never connected, and AI-assisted: yes. |
adriadam10
left a comment
There was a problem hiding this comment.
guest_socket_backlog fails on the current head, confirmed by @JJenkx on Windows (3 of 3 runs) and by the red windows check:
core/libs/tests/GuestSocketBacklog.cpp:179-183:sendtoon a never-connected stream socket returnsENOTCONN(57) on every host, notEFAULT. To testEFAULTfor the buffer and address pointers, use a connected socket (as lines 135-139 already set up). Please check the other rows on unconnected sockets (recvfrom,getpeername, 187-213) too.- The PR cites no source for the error precedence rows (
bind/connectlength vsEFAULTvsEBADF,connecton a listener givingEOPNOTSUPP). Please name the FreeBSD source (sys/kern/uipc_syscalls.c,kern_bind/kern_connect,getsockaddr) that each row follows.
Once the test passes on the Windows and Linux Build runs, it can be merged.
|
I am closing this one. guest_socket_backlog fails on the current head (red windows check, also reproduced by a tester): sendto on a never-connected stream socket gives ENOTCONN, not EFAULT, and the other unconnected-socket rows have the same problem. The error-precedence rows cite no FreeBSD source, and the backlog clamping it pins is behaviour that already works. It is test-only and changes nothing a game, a user or a developer would see. If you want to pin socket error precedence, a small PR with rows on connected sockets and a named FreeBSD source for each would fit. |
What
This pull request adds unit and negative tests in
core/libs/tests/GuestSocketBacklog.cppauditing FreeBSD 11.4 POSIX socket listen backlog boundary clamping (SOMAXCONN = 128),EFAULTvalidation on invalidsockaddrand length pointers, and error evaluation precedence acrosslibkernelsocket APIs.The tests verify:
SOMAXCONN(128), negative values (-1,-128,-1000,INT_MIN), and oversized values (129,256,1024,65535,INT_MAX) all succeed without error and accept incoming connections as expected.EOPNOTSUPP), connected sockets (EINVAL), and invalid descriptors (EBADF).EFAULT) for null and unmapped pointers inbind,connect,sendto,recvfrom,getsockname, andgetpeername.ENAMETOOLONG,EINVAL) precedes memory validity (EFAULT) and descriptor lookup (EBADF).Tested
python tools/check_conventions.py --base upstream/main --head HEAD(0 findings).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)