fix(libSceNpAuth): reject completion queries before request start #8611
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8611"
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 Ondra97 on 2026-10-20T18:23:37Z.
What
An async request aborted before start is accepted by Poll/Wait as if it had been submitted: Poll reports running and then finishes with
SIGNED_OUT. Calling a getter in between changes that completion toABORTED, even though the getter rejects the start.Poll/Wait now require a started async request, and rejected getters leave the stored result alone. The getters still return
ABORTED. This follows the request model already referenced by the library: shadPS4's StartRequest rejects a pre-start abort without creating a context, and FindAsyncRequest requires that context for Poll/Wait.The regression covers sync/async requests, repeated aborts and queries, the legacy/V3 getters, and unchanged result/issuer outputs. The old assertion that a rejected getter creates an aborted completion is corrected to
INVALID_ID. Submitted requests retain their signed-out completion and existing first-poll behavior.PS5 phase behavior remains unmeasured and is recorded in the library debt. This addresses ON C3 in #8005; no title compatibility claim is made.
Tested
Windows 11 Pro 10.0.26300; AMD Ryzen 9 7900X, 32 GB RAM, NVIDIA GeForce RTX 4070 Ti SUPER. WinLibs GCC 15.2.0 UCRT r7; Release,
BUILD_TESTING=ON.Current rebase validation: base
a6dcea9279b53b3a39c13695eac66f7c8b5b503c, head2236680340b3de46e51eb2283e23fa2c84b3de97. Production behavior is unchanged from the original fix. The documentation merge preserves current-main A variants, native timeout validation and authorized-app-code validation. Existing regression coverage for those upstream changes remains present.The full-configuration production targets and all selected fixtures build successfully without an overlay. All four selected runtime tests pass without skips (4/4, 0.40 s). Conventions, strict main-sync and whitespace checks pass. The overlap checker flags this PR itself and #6044; the latter moves
GuestNpAuth.cppunchanged (100% rename) and does not implement this fix.The default all-target build and complete CTest suite were not run on the rebased head.
The remaining original validation below is historical and pinned to its stated revisions.
Base:
892a4f1328a14a123eca4af8f3c9ea5d176133ab. Fix:6ce64bdfae1f41c0b862ae364b243b546d61edba.guest_np_authregressionThe same probe checks two Poll calls and one Wait call for five paths: direct abort, or abort followed by each getter. Every fixed query returns
INVALID_IDand preserves its output. The existing authorized-app-code test passes on base and fix; all three focused NP Auth tests pass on fix.The overlap checker reports no confirmed overlap. I checked that #8471's A variants compose cleanly with all three files. For the incomplete comparisons, #6044 moves the unchanged test and #6977 adds a no-argument declaration on a stale base; neither supplies this fix.
No console module is needed by the regression. No PSN request or game run was performed.
Full all-target Windows Release build passed. All four relevant runtime tests passed without skips; 354 patched libraries loaded with zero failures. The full build used a temporary alignment adjustment confined to an unrelated existing test; it was restored afterward and is absent from the submitted diff.
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 github-actions[bot] on 2026-10-20T18:39:18Z.
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/GuestNpAuth.cppImported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-20T23:52:43Z.
Independent Windows run of this PR (data only).
Environment: Windows 10 Pro 10.0.19045, Ryzen 7 5800X3D, WinLibs GCC 15.2.0 r7 (MinGW-w64 UCRT), Release, BUILD_TESTING=ON. Merge-tree of the PR head against
main339217ebc9is clean. I built onlyguest_np_auth_tests;ctest -N -R guest_np_authlists exactly one test.Results (3 runs each):
guest_np_authpasses 3/3.core/libs/prx/libSceNpAuth/Export.cppwith the version from the PR's merge base (892a4f1328), then rebuilt. The test fails 3/3 (exit 0xc0000409, a failedRequire). I restored the PR'sExport.cppafterwards.Not run: other platforms, the other NpAuth tests, the full repository CTest, and any title or console run.
AI-assisted (Claude Code).