feat(libSceIcu): accept a null handle in ucal_close #17160

Closed
MarrasFederico wants to merge 2 commits from upstream-pr/17160 into main
MarrasFederico commented 2026-11-08 13:40:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarrasFederico on 2026-11-08T13:40:51Z.


What

Calendar disposal has unverified console ABI and behavior, and throws NotImplemented_nid_no_patch for any non-null UCalendar* because no calendar producer (ucal_open, ucal_clone) is implemented. ucal_close follows ICU 68.2 ucal.cpp by returning without action when cal is null. Closes when: calendar creation and disposal are implemented and compared with the console.

The parameterless placeholder for ucal_close in RecoveredInventory.cpp is replaced by a typed APS5_VABI definition, and the recovered inventory count in docs/dev/debt/libSceIcu.md is updated to match the source.

Tested

Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, GCC 15.2.0, Release, BUILD_TESTING=ON, head d4c259d72f merged onto main 20cfe3fbdc. Windows and macOS were not compiled here. No title was run.

  • Built core/libs/prx/libSceIcu/all; ctest -R '^guest_icu_calendar$': 100% tests passed out of 1.
  • core/libs/prx/libSceIcu/tests/Calendar.cpp checks the exported signature with a static_assert and the paths above: returns, status values and untouched outputs, plus the inputs that must keep throwing.
  • python3 tools/check_conventions.py --base upstream/main passed and git diff --check is clean.

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:5211791923 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17160). Originally posted by [MarrasFederico](https://github.com/MarrasFederico) on 2026-11-08T13:40:51Z. --- ### What [Calendar disposal](https://github.com/boykopovar/AnyPS5/blob/main/core/libs/prx/libSceIcu/Calendar.cpp) has unverified console ABI and behavior, and throws `NotImplemented_nid_no_patch` for any non-null `UCalendar*` because no calendar producer (`ucal_open`, `ucal_clone`) is implemented. `ucal_close` follows [ICU 68.2 ucal.cpp](https://github.com/unicode-org/icu/blob/84e1f26ea77152936e70d53178a816dbfbf69989/icu4c/source/i18n/ucal.cpp#L188-L194) by returning without action when `cal` is null. Closes when: calendar creation and disposal are implemented and compared with the console. The parameterless placeholder for `ucal_close` in `RecoveredInventory.cpp` is replaced by a typed `APS5_VABI` definition, and the recovered inventory count in `docs/dev/debt/libSceIcu.md` is updated to match the source. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, GCC 15.2.0, Release, `BUILD_TESTING=ON`, head `d4c259d72f` merged onto `main` `20cfe3fbdc`. Windows and macOS were not compiled here. No title was run. - Built `core/libs/prx/libSceIcu/all`; `ctest -R '^guest_icu_calendar$'`: 100% tests passed out of 1. - `core/libs/prx/libSceIcu/tests/Calendar.cpp` checks the exported signature with a `static_assert` and the paths above: returns, status values and untouched outputs, plus the inputs that must keep throwing. - `python3 tools/check_conventions.py --base upstream/main` passed and `git diff --check` is clean. ### 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 <!-- #PR, or none --> - [x] Fixes: none <!-- issue it closes as Fixes #N, or none --> - [x] Unblocks: none <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> - [x] GPUs tested: n/a <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> - [x] AI-assisted: yes <!-- yes / no -->

Pull request closed

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!17160
No description provided.