fix(savedata): return parameter error on null arguments in umount2, loadIcon and saveIcon #7785

Merged
pushkarreddyy merged 1 commit from upstream-pr/7785 into main 2026-10-20 14:01:10 +00:00
pushkarreddyy commented 2026-10-19 07:23:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-19T07:23:08Z.


What

In libSceSaveData.native, return SAVE_DATA_ERROR_PARAMETER (0x809F0000) when null pointer mount_point arguments are passed to sceSaveDataUmount2, sceSaveDataLoadIcon, and sceSaveDataSaveIcon instead of throwing C++ exceptions across the guest boundary, consistent with sceSaveDataGetMountInfo and sceSaveDataGetParam from #7144. Unit tests in GuestSaveDataMountStatus.cpp and technical debt documentation are updated.

Tested

Built and verified on Windows with python tools/check_conventions.py --base origin/main. Added unit test assertions in GuestSaveDataMountStatus.cpp validating SaveDataErrorParameter on null arguments and SaveDataErrorNotMounted on unmounted targets for sceSaveDataUmount2, sceSaveDataLoadIcon, and sceSaveDataSaveIcon.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4917387913 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7785). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-10-19T07:23:08Z. --- ### What In `libSceSaveData.native`, return `SAVE_DATA_ERROR_PARAMETER` (`0x809F0000`) when null pointer `mount_point` arguments are passed to `sceSaveDataUmount2`, `sceSaveDataLoadIcon`, and `sceSaveDataSaveIcon` instead of throwing C++ exceptions across the guest boundary, consistent with `sceSaveDataGetMountInfo` and `sceSaveDataGetParam` from #7144. Unit tests in `GuestSaveDataMountStatus.cpp` and technical debt documentation are updated. ### Tested Built and verified on Windows with `python tools/check_conventions.py --base origin/main`. Added unit test assertions in `GuestSaveDataMountStatus.cpp` validating `SaveDataErrorParameter` on null arguments and `SaveDataErrorNotMounted` on unmounted targets for `sceSaveDataUmount2`, `sceSaveDataLoadIcon`, and `sceSaveDataSaveIcon`. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-19 07:44:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T07:44:13Z.


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.

Pull request Shared files not compared
PR 6044 core/libs/tests/GuestSaveDataMountStatus.cpp
PR 6879 core/libs/prx/libSceSaveData.native/Export.cpp
PR 6977 core/libs/prx/libSceSaveData.native/Export.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6262265279 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7785#issuecomment-6262265279). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-19T07:44:13Z. --- <!-- pr-overlap --> 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. | Pull request | Shared files not compared | |---|---| | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/tests/GuestSaveDataMountStatus.cpp` | | [PR 6879](https://www.github.com/boykopovar/AnyPS5/pull/6879) | `core/libs/prx/libSceSaveData.native/Export.cpp` | | [PR 6977](https://www.github.com/boykopovar/AnyPS5/pull/6977) | `core/libs/prx/libSceSaveData.native/Export.cpp` |
adriadam10 commented 2026-10-20 14:02:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-20T14:02:19Z.


Rebased onto current main (the test declarations/checks and the TechnicalDebt line conflicted with the sceSaveDataSetParam change; kept both sides and merged the function list into one line). The three null mount_point paths return SAVE_DATA_ERROR_PARAMETER before the slot lookup, the null checks would throw on main, and the not-mounted and mounted cases are covered; the SaveData tests pass after the rebase; merged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6292682531 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7785#issuecomment-6292682531). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-20T14:02:19Z. --- Rebased onto current `main` (the test declarations/checks and the TechnicalDebt line conflicted with the `sceSaveDataSetParam` change; kept both sides and merged the function list into one line). The three null `mount_point` paths return `SAVE_DATA_ERROR_PARAMETER` before the slot lookup, the null checks would throw on `main`, and the not-mounted and mounted cases are covered; the SaveData tests pass after the rebase; merged.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!7785
No description provided.