fix(libSceGameUpdate): return the module's lifecycle and argument errors #7856
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7856"
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 KernelPanicNT on 2026-10-19T11:17:46Z.
What
libSceGameUpdate now returns the module's own lifecycle and argument errors, and no longer reports success for requests that do not exist.
Source of the behaviour. prosper's reading of the PS5 3.20
libSceGameUpdate.sprxmarks the argument checks as HIGH confidence. Its implementation follows them:Initialize0x80412802Terminate0x80412801CreateRequest0x80412801Check(id, param, result)id <= 0→0x80412805; null pointer →0x80412803; either size not0x30→0x80412804; non-zero check type (+8) or reserved word (+0xc..+0x2c) →0x80412803; then not initialized →0x80412801; unknown id →0x80412805AbortRequest/DeleteRequestid <= 0→0x80412805; not initialized →0x80412801; unknown id →0x80412805GetAddcontLatestVersion0x80412803, before the initialization checkOn
main:InitializeandTerminatealways succeed.AbortRequestandDeleteRequestreturn 0 for any id, althoughCreateRequestnever creates a request.Checkignores its arguments.GetAddcontLatestVersionchecks initialization first.The
GetAddcontLatestVersionreordering is the change #2499 was asked to bring back as a single-library PR.CreateRequeston an initialized library still returns0x80D50001, so no request ever exists, andCheck,AbortandDeleteanswer0x80412805for any id that passes their argument checks. The module's 8 request slots and the answer of its patch-check service offline are recorded as debt and not modelled.Changes:
Export.cpp:ALREADY_INITIALIZEDandREQUEST_NOT_FOUNDcodes;static_asserts thatGameUpdateCheckParamandGameUpdateCheckResultare 0x30 bytes.guest_gameupdate, newTestRequestArguments:Initialize, a doubleTerminate;GetAddcontLatestVersionbefore initialization.docs/dev/debt/libSceGameUpdate.md: a new entry for the request functions.Tested
Linux (GitHub Codespace, 4 cores, native build of this branch on
36f60df9e, rebased onto674c25388without conflicts):guest_gameupdate: 5/5 runs pass.Export.cppfrommain,guest_gameupdateaborts (sceGameUpdateTerminatebefore initialization returns 0); 5/5 pass again after restoring it.Windows (fork CI, run 39238868071, this branch on
674c25388): build and the full test suite pass, 1632/1632.Checks:
python3 tools/check_conventions.py --base origin/mainpasses;python3 tools/pr_overlap.py --branch fix/gameupdate-lifecycle-errorsreports only the test reorganization #6044.tools/progress.py: unchanged (3887/4698 on base and head); this corrects return values only.Checklist
main(674c25388); 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)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T11:25:39Z.
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.
core/libs/tests/GuestGameUpdate.cppImported from boykopovar/AnyPS5. Originally posted by fogydes on 2026-10-19T12:34:44Z.
Review: COMMENTED
Verified on Windows 11 with MinGW-w64 GCC 15.2.0 (Release):
core/libs/prx/libSceGameUpdate/Export.cpp, argument validation and lifecycle checks align with PS5 3.20 behaviour (returning0x80412802for duplicate initialization,0x80412801for uninitialized calls,0x80412805for invalid/unregistered request IDs, and checking pointers before initialization insceGameUpdateGetAddcontLatestVersion).static_asserts properly guardGameUpdateCheckParamandGameUpdateCheckResultagainst layout drift.guest_gameupdate_tests.exeand verifiedctest --test-dir build-libs -R "^guest_gameupdate$" -Vpasses in 0.06s: All request parameter checks, double initialize/terminate, and null check fixtures passed.docs/dev/debt/libSceGameUpdate.md. Zero code comments added;tools/check_conventions.pypasses cleanly.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-20T02:48:23Z.
Checked against prosper's reading of the PS5 3.20 module (check order for
Check,Abort,Delete,Initialize,Terminate,GetAddcontLatestVersion), theGameUpdateCheckParam/Resultlayouts (option at +8, 9 reserved words, 0x30 total), and the new test rows (they fail onmain:TerminatebeforeInitializereturned 0). The debt entry covers the unmodelled request slots; merged.