fix(libSceSaveData): keep sceSaveDataGetMountedSaveDataCount unimplemented #14150
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14150"
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 rooklz on 2026-10-31T20:56:44Z.
What
Keep
sceSaveDataGetMountedSaveDataCountunimplemented: every call throwsNotImplemented_nid_no_patch(__func__)and reads neither argument, as the export does onmain. The console contract is unmeasured — the first argument's meaning, the count it returns, its error ordering and its null handling. SharpEmu and RPS5E both write the count through the second argument, so the declaration records that two-argument shape; neither establishes the first argument, and both return invented success rather than the console's behaviour. The debt entry states the gap.core/libs/tests/GuestSaveDataMountStatus.cppasserts that the call throws before initialization, after initialization, for a null count, and for a nonzero first argument, and that it writes no count.Tested
python3 tools/check_conventions.py --base upstream/main: PASSpython3 tools/pr_overlap.py --branch feat/savedata-mounted-count-arg2: exit 0guest_savedata_mount_statusbuilds and passes with the four throw assertionsChecklist
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-31T20:58:32Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
The implementation returns success while ignoring the first argument, whose PS5 meaning the PR explicitly says is unverified.
What I ran
Reviewed head
645cda522f5e82d255b34b4b79cc158ecb1155e4against PR base9fe758d7520eb0c33f3df8bef539064b40bd523f; the no-build merge preview against that base was clean. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0. I inspected the implementation, declaration, added assertions, previous #13785 discussion, and the two cited implementations. I did not build or run C++ tests locally.Results
9fe758d7520eb0c33f3df8bef539064b40bd523f.pr_abi_audit.pyandpr_test_quality.py.Unedited local check output
Findings
Blocking
std::int32_t reserved, ignores every value, and returnsSAVE_DATA_OK; the PR's own debt entry says its meaning is unverified. SharpEmu and RPS5E support reading the count from the second argument, but their implementations do not establish the PS5 contract for the first argument. Repository guidance requires unknown export behavior to remain explicitly unimplemented rather than returning invented success. Please keep this export throwing until the first argument's role and the success/error behavior are supported by authoritative evidence or a console measurement. If evidence establishes that the first argument is ignored, update the debt entry and add a regression covering representative nonzero values.Non-blocking
None identified from the inspected source.
Sources
Not verified
I did not run a non-relinker build,
guest_savedata_mount_status, or a console test. The new C++ assertions are not executed by the reported relinker-only CTest run. The hosted Windows job was queued at the last refresh.To get this to a good state
Keep the export throwing until the first argument and return behavior are evidenced, or add authoritative/console evidence and tests that establish the full contract. I will rerun the same no-build checks on the new head.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T09:38:25Z.
Review: COMMENTED
Re-checked — new head, change request addressed; Windows pending
At
ce8f3172d0the export throws again and the test asserts the throw, which is the change requested on645cda522f; the hosted Windows job at this head had not finished at review time.What I ran
ce8f3172d0fcab657625bdf519594a707b3ddbd5(one new commit after645cda522f, the head of my change request), base1bc97b9527eaf6b56681cd3465bca67b75329161.645cda522f..ce8f3172d0read in full:Export.cpp,GuestSaveDataMountStatus.cpp,CMakeLists.txt, anddocs/dev/debt/libSceSaveData.native.md.Results
git diff --checkpossible-unregistered-cpp-testfinding. False positive:GuestSaveDataMountStatus.cppis registered incore/libs/prx/libSceSaveData.native/CMakeLists.txtat lines 35-38.Findings
Blocking
None.
Resolved from my change request
NotImplemented_nid_no_patch(__func__), which throwsstd::runtime_error(core/libs/prx/libc/src/General.cpp:1020-1023at this head). The test'sMountedCountThrowscatchesstd::runtime_error, so the assertions match the throw. Every call site in the test is converted, including the nonzero first argument and the null count.guest_savedata_mount_statuswith0xc0000409) is handled byconfigure_windows_unwind(guest_savedata_mount_status_tests)at line 38. The author's claim that every sibling SaveData test target has the same call holds: lines 8, 18, 28, 38, 48, 58 and 68 each call it for their target.Sources
github.com/boykopovar/AnyPS5@ce8f3172d0/core/libs/prx/libSceSaveData.native/Export.cpp (L1305-L1311)github.com/boykopovar/AnyPS5@ce8f3172d0/core/libs/prx/libc/src/General.cpp (L1020-L1023)github.com/boykopovar/AnyPS5@ce8f3172d0/core/libs/prx/libSceSaveData.native/CMakeLists.txt (L35-L38)Not verified
ce8f3172d0: queued at review time. Theguest_savedata_mount_statusfix has not been confirmed on a Windows runner.MountedCountThrows) were not executed here, and no negative control was run.To get this to a good state
ce8f3172d0to finish. If it passes, I will re-check and update the review decision on this head. The change request stays in place until then.