feat(libSceIcu): implement uloc_getName and uloc_openKeywords #18557

Closed
flyingkitty129 wants to merge 2 commits from upstream-pr/18557 into main
flyingkitty129 commented 2026-11-11 21:41:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by flyingkitty129 on 2026-11-11T21:41:50Z.


What

Tested

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:
  • Fixes:
  • Unblocks:
  • GPUs tested:
  • AI-assisted:
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5267172278 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18557). Originally posted by [flyingkitty129](https://github.com/flyingkitty129) on 2026-11-11T21:41:50Z. --- ### What ### 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. --> ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [ ] 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](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [ ] 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 - [ ] 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: <!-- #PR, or none --> - [ ] Fixes: <!-- issue it closes as Fixes #N, or none --> - [ ] Unblocks: <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> - [ ] GPUs tested: <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> - [ ] AI-assisted: <!-- yes / no -->
MarcZX10 commented 2026-11-19 06:18:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T06:18:17Z.

Review: COMMENTED


Reviewed — comments

Nothing blocks this; the points below are optional.

What I ran

Reviewed head af0cc82b891b1349b93b9739aed71cef8e08ccd8. No commands or tests were run.

Results

Check Result Note
Code review passed Changed behavior inspected
Tests not run No test execution
Console behavior not run No console verification

Findings

Blocking

None.

Non-blocking

  • core/libs/prx/libSceIcu/LocaleCore.cpp:447: Catch allocation failures while building list->names too. The new (std::nothrow) only handles allocation of KeywordList; subsequent std::string appends can still throw across this guest C ABI entry point. Reserve/build the names inside a try block and convert std::bad_alloc to the ICU memory allocation status.

Not verified

Full head text was read for LocaleCore.cpp and GuestIcuLocaleCore.cpp. The relevant diff was inspected for InventoryExports.hpp, LegacyExports.cpp, LegacyExports.hpp, and docs/dev/debt/libSceIcu.md; their complete texts were not read. manifest.json lists all six changed files as included; files.json was not available as a review-folder document, so excluded-file details were not verified. Tests, builds, and console behavior were not run.

To get this to a good state

Nothing is required. Optional: handle allocation failures from building the enumeration’s keyword-name buffer.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5970254676 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18557#pullrequestreview-5970254676). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-19T06:18:17Z. **Review:** COMMENTED --- # Reviewed — comments Nothing blocks this; the points below are optional. ## What I ran Reviewed head `af0cc82b891b1349b93b9739aed71cef8e08ccd8`. No commands or tests were run. ## Results | Check | Result | Note | |---|---|---| | Code review | passed | Changed behavior inspected | | Tests | not run | No test execution | | Console behavior | not run | No console verification | ## Findings ### Blocking None. ### Non-blocking - `core/libs/prx/libSceIcu/LocaleCore.cpp:447`: Catch allocation failures while building `list->names` too. The `new (std::nothrow)` only handles allocation of `KeywordList`; subsequent `std::string` appends can still throw across this guest C ABI entry point. Reserve/build the names inside a `try` block and convert `std::bad_alloc` to the ICU memory allocation status. ## Not verified Full head text was read for `LocaleCore.cpp` and `GuestIcuLocaleCore.cpp`. The relevant diff was inspected for `InventoryExports.hpp`, `LegacyExports.cpp`, `LegacyExports.hpp`, and `docs/dev/debt/libSceIcu.md`; their complete texts were not read. `manifest.json` lists all six changed files as included; `files.json` was not available as a review-folder document, so excluded-file details were not verified. Tests, builds, and console behavior were not run. ## To get this to a good state Nothing is required. Optional: handle allocation failures from building the enumeration’s keyword-name buffer.

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