feat(libSceNpCppWebApi): track the remaining SessionManager V1 parameter lifecycles as the module does #11644
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/11644"
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 AlexFigas on 2026-10-27T00:52:51Z.
What
The five remaining
SessionManager::V1::PlayerSessionsApiparameter classes that PPSA20397 imports kept no state:ParameterToGetPlayerSessionsParameterToSendPlayerSessionInvitationsParameterToSetPlayerSessionPropertiesParameterToChangePlayerSessionLeaderParameterToAddPlayerSessionJoinableSpecifiedUsersEvery member, constructors included, was declared without parameters and returned 0. They now follow the module bundled with PPSA21564 (
sce_module/libSceNpCppWebApi.prx, the library's own code), like the four classes in #11635. With this PR, everyPlayerSessionsApiparameter AnyPS5 exports tracks its lifecycle.ParameterBaseconstructor zeroes +0, then+8 = 0ConstructParameterGetPlayerSessions::initialize(LibContext*, const char*)(0x29b4d0)LibContext→0x80553503; context not found →0x80553502;+8 != 0→0x8055350f; thenString::copyFrom, where a null string gives0x80553503and undoes everythingInitializeParameterinitialize(LibContext*, const char* sessionId, IntrusivePtr<…RequestBody>)(0x2a1580, 0x2a4600, 0x293b20, 0x292870)0x80553512after undoing everythingInitializeParameterWithBody, asParameterToJoinPlayerSessionAsPlayerin #11635terminate(0x29b6a0, 0x2a1920, 0x2a49a0, 0x293ec0, 0x292c10)+8 == 0→0x80553510; otherwise frees it,+8 = 0TerminateParameterjmp ParameterBase::~ParameterBaseGetPlayerSessions::setfields(0x29b850) keeps its no-op, asGetPlayerSessionInvitations::setfieldsdoes in #11635. No argument is kept, because only a request would read one, and requests fail withSCE_NP_WEBAPI_ERROR_NOT_SIGNED_INhere.Api.hppdeclares the members with their real parameters. The PPSA20397 debt entry now says thePlayerSessionsApiparameters are the exception to "parameter bookkeeping succeeds without state".Tested
On Ubuntu 24.04 under WSL2 (GCC 13.3, Release), rebased onto
main5bc84038c4,ctest --test-dir build -R np_cpp_web_apipasses all 4 tests (2 runs), andpython3 core/libs/tests/test_public_headers.py --audit-onlyverifies 368 libraries and 12811 exports.guest_np_cpp_web_api_offlinegainsTestPlayerSessionParameterLifecycles, which runs each class throughTestParameterLifecycle:terminatereturns0x80553510beforeinitialize;initializereturns0x80553503for a null context and0x80553502for a context that is not set up;0x80553503and an empty request body gives0x80553512, both leaving the parameter uninitialized;initializesucceeds, a second call returns0x8055350f, andterminateworks once and again after a newinitialize.The four body-taking classes share an
InitializeSessionWithBodyhelper in the test.Also run:
python3 tools/check_conventions.py --base origin/mainpasses.python3 tools/pr_overlap.py --branch feat/npcppwebapi-sessionmanager-remaining-parameter-lifecyclesreports #12447, which edits the debt entry below this PR's line; it declaresDepends on: #11644and follows this PR. #11631 conflicts withmain, so the tool could not compare it; it gives the samegit merge-treeconflicts with this branch as withmain.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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-27T01:05:40Z.
Review: CHANGES_REQUESTED
The declared dependency on #11639 correctly captures this stack. There is also a reported overlap with open #11235 in the signed-out test and debt document, described as “whichever lands second gets rebased,” without an agreed order recorded on this PR.
CONTRIBUTING.mdrequires overlapping PRs to agree which goes first and declare the ordering withDepends on. A merge-tree check confirms those two files conflict with #11235 as currently submitted. Please coordinate the order and record it in the checklist (or update the overlap report if resolved).Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-27T11:02:23Z.
Review: APPROVED
Reviewed exact head
6df6a4b16e. The remaining SessionManager parameter methods use the established lifecycle checks; body-taking initializers reject empty request bodies and clear initialization state on that failure. The tests exercise all five classes through construction, failed and successful initialization, repeated initialization, termination, and reinitialization.Independent local check: built the exact offline and signed-out WebApi test targets and ran both under
qemu-x86_64 -cpu max; both exited successfully. The author reports the full focused suite and public-header audit passing natively on WSL, and hosted Windows passed. This PR depends on #11639. Main has advanced four commits beyond the base without changing these paths; please update the stack before merge. I found no additional defect in the reviewed scope.