fix(libSceRudp): check the context status arguments first and initialization before the id pointer #13849
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/13849"
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 zaryabzip on 2026-10-31T09:26:52Z.
What
Two libSceRudp answers now follow the firmware readings on #13682.
sceRudpGetContextStatus(int ctxId, void* status, uint32_t size)statusor asizeoutside 1 to 0x30 returns0x80770004, before the id is looked up.0x80770003.sizebytes of a 0x30-byte block. The block is zero except for0xFFFFFFFFat bytes 4-7, which is what the 13.42 run read for an idle context.On
mainit accepted any size, returned 0 for a null pointer, checked the id first, and wrote zeros. Every context answers with the idle block here. The run didn't read a bound or listening context, and the new debt entry says so.sceRudpCreateContext: before initialization, a null id pointer returns0x80770001, as in the 13.42 run.mainchecked the pointer first and returned0x80770004.No function changes count.
GuestRudpContextLifecycle.cppchanges to match:sizestay untouched.sceRudpCreateContext(handler, NULL, NULL)before init.Overlap: this doesn't depend on my other Rudp PRs (#13718, #13799, #13814).
git merge-treemerges it cleanly with each of them, with #11042 and #13844, and with every other open pull request that merges withmain.Tested
Windows 11 (WinLibs MinGW-w64 GCC 15.2.0 UCRT r7, CMake 4.3.1, Ninja 1.13.2) and Ubuntu 24.04 on WSL2 (GCC 13.3.0, CMake 3.28.3, Ninja 1.11.1), both with the head
553f1a82d2merged intomain1b91748340.Export.cpporGuestRudpContextLifecycle.cpp.ctest -R "guest_rudp|rudp_poll": 6 of 6 pass on WSL2 and 7 of 7 on Windows (plusrudp_poll_wait_exception).guest_rudp_context_lifecyclepasses 3 of 3 on--repeat until-fail:3.mainwith only the test change,guest_rudp_context_lifecyclebuilds and then aborts atsceRudpCreateContext(Handler, nullptr, nullptr) == notInitialized(line 127) on both hosts (Windows exit 0xc0000409, Linux SIGABRT).tools/check_conventions.pypasses.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)Pull request closed