fix(libSceNet): report the registered socket as the epoll event ident #4612
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4612"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-12T16:45:28Z.
What
sceNetEpollWaitcopied the whole event a title passed tosceNetEpollControl, soidentandreservedcame back as the title had left them. Theidentof a returned event is the id that was registered, andreservedis 0: shadPS4 net.cpp with guest_net.h (ident // socket id), and KytyPS5 network.cpp. Socket 32, registered withreserved0x5a5a5a5a:identmainreturnsident0,reserved0x5a5a5a5aident0x20,reserved0ident0x123456789abcdef0,reserved0x5a5a5a5aident0x20,reserved0A title that registers a socket without filling
identand looks the socket up by it now finds it.datais returned unchanged, as before.Tested
Windows 11 (10.0.26300), WinLibs MinGW-w64 GCC 15.2.0 r7 (UCRT), Release,
-DBUILD_TESTING=ON, onmainat2a5eca11:main'sExport.cpp, the newCheckEpollIdentinguest_sce_netaborts (exit0xc0000409);guest_sce_netpasses onmainitself, IPv6 checks included, so the abort is the new check. With the change it passes, 20 runs in a row.core/libs/prx/libc/CMakeLists.txtandcore/libs/prx/libkernel/CMakeLists.txtthat build on Windows pass, and so do the network tests (guest_datagram_recv,guest_datagram_recvfrom,guest_datagram_sceNetRecv,guest_datagram_sceNetRecvfrom,guest_udp,guest_resolver,guest_posix_filesystem).Linux (Ubuntu 24.04, GCC 13.3, Release), base
33ae282e: the newCheckEpollIdentinguest_sce_netaborts onmainand passes with the change, 20/20; the libSceNet, libc and libkernel tests are unchanged. Again on WSL2 (Ubuntu 24.04, GCC 13.3.0, Release with CI's configure flags), merged intomainatc952c2b0e, IPv6 checks included: it aborts withmain'sExport.cppand passes with the change, 20 runs in a row.tools/check_conventions.py --base origin/mainpasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-13T14:44:58Z.
Checked against shadPS4 and KytyPS5 (both return the registered id as
identandreserved0;NetEpollEventlayout matches). Built and ran the libSceNet/libc/libkernel tests on the PR merged into main: all pass, andguest_sce_netfails withmain'sExport.cpp. Merging once the full build is green.