feat(libSceIcu): implement data-free ucnv converter exports over ICU #18400

Open
SHOnnay wants to merge 21 commits from upstream-pr/18400 into main
SHOnnay commented 2026-11-11 13:24:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by SHOnnay on 2026-11-11T13:24:44Z.


What

Implements 33 throwing ucnv_* converter exports in libSceIcu.

How. They are thin wrappers over the ICU 78.1 submodule the library already builds (3rdparty/icu at 049e0d6a420629ac7db77256987d083a563287b5), following the pattern of Bidi.cpp and Normalization.cpp. The code is in the new Converter.cpp/.hpp.

Signatures. The 3.20 export names are ICU 68.2 names. Every U_CAPI prototype in ucnv.h matches between release-68-2 and the pinned 78.1 commit, except the safeClone→clone rename, which is not among these exports.

Exports:

  • open/close: open, openU, close
  • queries: getName, getMaxCharSize, getMinCharSize, getType, isFixedWidth, isAmbiguous, getCCSID, getPlatform, getStarters
  • substitution and invalid input: getSubstChars, setSubstChars, setSubstString, getInvalidChars, getInvalidUChars
  • fallback, pending counts and reset: setFallback, usesFallback, fromUCountPending, toUCountPending, reset, resetToUnicode, resetFromUnicode
  • conversion: fromUnicode, toUnicode, fromUChars, toUChars, getNextUChar, convertEx, convert, toAlgorithmic, fromAlgorithmic

Still throws. This build has no ICU data files. Wherever ICU would return U_FILE_ACCESS_ERROR/U_MISSING_RESOURCE_ERROR, the export throws:

  • aliases such as latin1
  • table-based charsets, HZ, ISO-2022, LMBCS, compound text
  • getCCSID for UTF-7, IMAP and ISCII

It also throws for a null name (ICU would open the host's default converter) and for a non-ASCII openU name. Every name ICU accepts without data maps to the same converter in convrtrs.txt, and none is ambiguous.

Left throwing:

  • callback setters and getters, ucnv_cb* writers and the ESCAPE/SUBSTITUTE callbacks: these need the guest callback ABI
  • getCanonicalName, openCCSID, openPackage and the available-name lists: these need alias data
  • u_get/release/flushDefaultConverter: the console's default converter is unknown

Removed. The 10 stubs in Export.cpp/InventoryExports.hpp and the 23 in LegacyExports.cpp/.hpp. The debt file is updated: counts, table rows, a Converters entry and the Legacy entry.

Tested

macOS 27 on Apple M1. The new registered test guest_icu_converter (tests/Converter.cpp, 151 checks) is a full-build test and was not run: the full build does not run on macOS. A Linux or Windows run is needed.

Expected values come from ICU source and documentation. One example: a UTF-16 BOM is written in platform byte order, so FF FE on the PS5.

Harness. A temporary host harness, not committed, compiled the unchanged Converter.cpp, the test, and ICU common sources from Icu.cmake's file list. It passed on x86-64 under Rosetta and on arm64.

Mutation check. 6 of 8 hand mutations failed the harness:

  • FileAccess check removed
  • setFallback inverted
  • convert's default-target check removed
  • forced flush in toUnicode
  • openU error code changed
  • getCCSID data check removed

The other 2 give the same visible result: >=→> in openU, and the ASCII limit 0x7f→0xff.

Syntax. -fsyntax-only passes on every changed .cpp, with the include paths and defines the CMake target supplies.

$ python3 tools/check_conventions.py --base upstream/main
All conventions checks passed.
$ python3 core/libs/tests/test_public_headers.py --audit-only
407 libraries, 34229 exports: unique declarations and umbrella coverage verified

Overlap. No open PR implements these exports.

  • gh pr list searches found nothing.
  • pr_overlap.py flags #14443 for getCCSID, openU and toAlgorithmic. Its diff only moves those stubs, which still throw.
  • In 13 PRs it could not compare (10964-10967, 14123, 14212, 16250, 17265, 17297, 17537, 18203, 18208, 18210), the changed lines contain none of the 33 names.
  • Textual conflicts are possible with #14144, #14340 and #14443 in LegacyExports and the debt file.

Risks. Behaviour is ICU 78.1's, while the 3.20 console has 68.2. UBool results are normalised to 0/1, and guests are assumed to treat UConverter* as opaque. Null pointers that ICU would dereference throw std::invalid_argument, as in Normalization.cpp.

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 (Claude Code)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added support for ICU character converters, including converter metadata and settings, UTF-8/UTF-16 conversions, streaming conversions, and algorithmic conversions.
    • Added support for substitution characters, invalid-input reporting, pending conversion data, and standard converter names.
  • Limitations
    • Some converter names and callback operations remain unsupported. Callback records are not released when converters are closed.
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5260279898 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18400). Originally posted by [SHOnnay](https://github.com/SHOnnay) on 2026-11-11T13:24:44Z. --- ### What Implements 33 throwing `ucnv_*` converter exports in libSceIcu. **How.** They are thin wrappers over the ICU 78.1 submodule the library already builds (`3rdparty/icu` at `049e0d6a420629ac7db77256987d083a563287b5`), following the pattern of `Bidi.cpp` and `Normalization.cpp`. The code is in the new `Converter.cpp`/`.hpp`. **Signatures.** The 3.20 export names are ICU 68.2 names. Every `U_CAPI` prototype in `ucnv.h` matches between `release-68-2` and the pinned 78.1 commit, except the `safeClone`→`clone` rename, which is not among these exports. **Exports:** - open/close: `open`, `openU`, `close` - queries: `getName`, `getMaxCharSize`, `getMinCharSize`, `getType`, `isFixedWidth`, `isAmbiguous`, `getCCSID`, `getPlatform`, `getStarters` - substitution and invalid input: `getSubstChars`, `setSubstChars`, `setSubstString`, `getInvalidChars`, `getInvalidUChars` - fallback, pending counts and reset: `setFallback`, `usesFallback`, `fromUCountPending`, `toUCountPending`, `reset`, `resetToUnicode`, `resetFromUnicode` - conversion: `fromUnicode`, `toUnicode`, `fromUChars`, `toUChars`, `getNextUChar`, `convertEx`, `convert`, `toAlgorithmic`, `fromAlgorithmic` **Still throws.** This build has no ICU data files. Wherever ICU would return `U_FILE_ACCESS_ERROR`/`U_MISSING_RESOURCE_ERROR`, the export throws: - aliases such as `latin1` - table-based charsets, HZ, ISO-2022, LMBCS, compound text - `getCCSID` for UTF-7, IMAP and ISCII It also throws for a null name (ICU would open the host's default converter) and for a non-ASCII `openU` name. Every name ICU accepts without data maps to the same converter in `convrtrs.txt`, and none is ambiguous. **Left throwing:** - callback setters and getters, `ucnv_cb*` writers and the ESCAPE/SUBSTITUTE callbacks: these need the guest callback ABI - `getCanonicalName`, `openCCSID`, `openPackage` and the available-name lists: these need alias data - `u_get/release/flushDefaultConverter`: the console's default converter is unknown **Removed.** The 10 stubs in `Export.cpp`/`InventoryExports.hpp` and the 23 in `LegacyExports.cpp`/`.hpp`. The debt file is updated: counts, table rows, a Converters entry and the Legacy entry. ### Tested macOS 27 on Apple M1. The new registered test `guest_icu_converter` (`tests/Converter.cpp`, 151 checks) is a full-build test and was **not run**: the full build does not run on macOS. A Linux or Windows run is needed. **Expected values** come from ICU source and documentation. One example: a UTF-16 BOM is written in platform byte order, so FF FE on the PS5. **Harness.** A temporary host harness, not committed, compiled the unchanged `Converter.cpp`, the test, and ICU common sources from `Icu.cmake`'s file list. It passed on x86-64 under Rosetta and on arm64. **Mutation check.** 6 of 8 hand mutations failed the harness: - FileAccess check removed - setFallback inverted - convert's default-target check removed - forced flush in toUnicode - openU error code changed - getCCSID data check removed The other 2 give the same visible result: `>=`→`>` in openU, and the ASCII limit 0x7f→0xff. **Syntax.** `-fsyntax-only` passes on every changed .cpp, with the include paths and defines the CMake target supplies. ```text $ python3 tools/check_conventions.py --base upstream/main All conventions checks passed. $ python3 core/libs/tests/test_public_headers.py --audit-only 407 libraries, 34229 exports: unique declarations and umbrella coverage verified ``` **Overlap.** No open PR implements these exports. - `gh pr list` searches found nothing. - `pr_overlap.py` flags #14443 for `getCCSID`, `openU` and `toAlgorithmic`. Its diff only moves those stubs, which still throw. - In 13 PRs it could not compare (10964-10967, 14123, 14212, 16250, 17265, 17297, 17537, 18203, 18208, 18210), the changed lines contain none of the 33 names. - Textual conflicts are possible with #14144, #14340 and #14443 in `LegacyExports` and the debt file. **Risks.** Behaviour is ICU 78.1's, while the 3.20 console has 68.2. `UBool` results are normalised to 0/1, and guests are assumed to treat `UConverter*` as opaque. Null pointers that ICU would dereference throw `std::invalid_argument`, as in `Normalization.cpp`. ### 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: <!-- #PR, or none --> none - [x] Fixes: <!-- issue it closes as Fixes #N, or none --> none - [x] Unblocks: <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> none - [x] 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 --> n/a - [x] AI-assisted: <!-- yes / no --> yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Added support for ICU character converters, including converter metadata and settings, UTF-8/UTF-16 conversions, streaming conversions, and algorithmic conversions. * Added support for substitution characters, invalid-input reporting, pending conversion data, and standard converter names. * **Limitations** * Some converter names and callback operations remain unsupported. Callback records are not released when converters are closed. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
MarcZX10 commented 2026-11-19 02:50:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T02:50:59Z.

Review: COMMENTED


Reviewed — comments

The converter exports and their tests were read at head 29ac4ea4f431a45a88f442cf7a2020a7b0b8e824; the registered test was not run here, so approval is not justified.

What I ran

  • Read the prepared description, commits, manifest, and diff; reviewed all available changed source and test files at the pinned head.
  • No commands or tests were run in this review.

Results

Check Result Note
Diff and source review passed Converter implementation and tests read
Registered converter test not run PR description says full build test was not run
Console behavior not run No physical-console validation reported

Findings

Blocking

None.

Non-blocking

  • ucnv_close_nid_postfix and the reset wrappers pass null converter pointers directly to ICU (Converter.cpp:94-113). ICU APIs expect a converter object, and the other wrappers reject null converters; either guard these wrappers consistently or add evidence that null is a supported no-op.

Not verified

  • No test, build, or syntax check was run by this review. The PR description reports author-run harness and syntax checks; those were not independently verified.
  • Console behavior and the ICU 68.2 versus 78.1 compatibility assumptions were not verified.
  • The prepared manifest lists 10 changed files, all marked included. I read Converter.cpp, Converter.hpp, the converter test, CMakeLists.txt, Export.cpp, LegacyExports.cpp, InventoryExports.hpp, LegacyExports.hpp, libSceIcu.hpp, and the two debt files. I did not read the full text of every included changed file; excluded files were not listed in the prepared materials shown to this review.

To get this to a good state

Nothing is required. Optional: clarify the null-converter behavior of the close and reset wrappers, and run the registered converter test on a supported full-build platform.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5968604937 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18400#pullrequestreview-5968604937). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-19T02:50:59Z. **Review:** COMMENTED --- # Reviewed — comments The converter exports and their tests were read at head `29ac4ea4f431a45a88f442cf7a2020a7b0b8e824`; the registered test was not run here, so approval is not justified. ## What I ran - Read the prepared description, commits, manifest, and diff; reviewed all available changed source and test files at the pinned head. - No commands or tests were run in this review. ## Results | Check | Result | Note | |---|---|---| | Diff and source review | passed | Converter implementation and tests read | | Registered converter test | not run | PR description says full build test was not run | | Console behavior | not run | No physical-console validation reported | ## Findings ### Blocking None. ### Non-blocking - `ucnv_close_nid_postfix` and the reset wrappers pass null converter pointers directly to ICU (`Converter.cpp:94-113`). ICU APIs expect a converter object, and the other wrappers reject null converters; either guard these wrappers consistently or add evidence that null is a supported no-op. ## Not verified - No test, build, or syntax check was run by this review. The PR description reports author-run harness and syntax checks; those were not independently verified. - Console behavior and the ICU 68.2 versus 78.1 compatibility assumptions were not verified. - The prepared manifest lists 10 changed files, all marked included. I read `Converter.cpp`, `Converter.hpp`, the converter test, `CMakeLists.txt`, `Export.cpp`, `LegacyExports.cpp`, `InventoryExports.hpp`, `LegacyExports.hpp`, `libSceIcu.hpp`, and the two debt files. I did not read the full text of every included changed file; excluded files were not listed in the prepared materials shown to this review. ## To get this to a good state Nothing is required. Optional: clarify the null-converter behavior of the close and reset wrappers, and run the registered converter test on a supported full-build platform.
MarcZX10 commented 2026-11-19 08:30:17 +00:00 (Migrated from github.com)

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

Review: COMMENTED


Reviewed — comments

Changes are required before merge: the wrappers may pass a null ICU error-status pointer where the corresponding API requires a valid status pointer, causing a null dereference instead of the stated invalid-argument exception.

What I ran

  • Reviewed head b736b22e0203e63f5558ed71bf2e0c47ed81bae9 using the prepared diff and the pinned reader.
  • No commands or tests were run; the description says the registered full-build test was not run.

Results

Check Result Note
Source review passed Converter wrappers inspected
Registered test not run Author reports it was not run
Other reported checks not run Reports in description were not independently verified

Findings

Blocking

None verified.

Non-blocking

  • Several wrappers forward error directly via Status(error) without checking it, unlike wrappers using Required(error). For example, ucnv_fromUCountPending and ucnv_getInvalidChars can pass null to ICU (core/libs/prx/libSceIcu/Converter.cpp:195, core/libs/prx/libSceIcu/Converter.cpp:178). This conflicts with the description’s claim that null pointers that ICU would dereference throw std::invalid_argument. Consider validating required status pointers consistently before forwarding them.

Not verified

  • The 33 exports and their behavior were not exhaustively audited; the registered test and syntax checks were not run.
  • The full contents of core/libs/prx/libSceIcu/tests/Converter.cpp were not read. No excluded files were identified in the supplied file list.
  • The harness, mutation checks, convention checks, public-header audit, and overlap checks described by the author were not independently verified.

To get this to a good state

Nothing is required. Optional: validate required status pointers consistently in wrappers that pass Status(error) directly.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5971658709 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18400#pullrequestreview-5971658709). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-19T08:30:17Z. **Review:** COMMENTED --- # Reviewed — comments Changes are required before merge: the wrappers may pass a null ICU error-status pointer where the corresponding API requires a valid status pointer, causing a null dereference instead of the stated invalid-argument exception. ## What I ran - Reviewed head `b736b22e0203e63f5558ed71bf2e0c47ed81bae9` using the prepared diff and the pinned reader. - No commands or tests were run; the description says the registered full-build test was not run. ## Results | Check | Result | Note | |---|---|---| | Source review | passed | Converter wrappers inspected | | Registered test | not run | Author reports it was not run | | Other reported checks | not run | Reports in description were not independently verified | ## Findings ### Blocking None verified. ### Non-blocking - Several wrappers forward `error` directly via `Status(error)` without checking it, unlike wrappers using `Required(error)`. For example, `ucnv_fromUCountPending` and `ucnv_getInvalidChars` can pass null to ICU (`core/libs/prx/libSceIcu/Converter.cpp:195`, `core/libs/prx/libSceIcu/Converter.cpp:178`). This conflicts with the description’s claim that null pointers that ICU would dereference throw `std::invalid_argument`. Consider validating required status pointers consistently before forwarding them. ## Not verified - The 33 exports and their behavior were not exhaustively audited; the registered test and syntax checks were not run. - The full contents of `core/libs/prx/libSceIcu/tests/Converter.cpp` were not read. No excluded files were identified in the supplied file list. - The harness, mutation checks, convention checks, public-header audit, and overlap checks described by the author were not independently verified. ## To get this to a good state Nothing is required. Optional: validate required status pointers consistently in wrappers that pass `Status(error)` directly.
MarcZX10 commented 2026-11-21 04:38:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T04:38:35Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

Changes are required before merge: ucnv_openU can read beyond the supplied buffer when given an unterminated name.

What I ran

Reviewed head 2497bdc0c2a80f9d03fb730976aca9bab3db1a0f. No commands or tests were run; the author reports that the registered test was not run on the full build.

Read the prepared description, commits, manifest and diff, plus the complete changed Converter.cpp, Converter.hpp, and tests/Converter.cpp files. Other changed files were present in the review materials but their full source was not read. files.json was not available as a review document.

Results

Check Result Note
Source review failed Unterminated name can overread
Registered test not run Author reports no full-build run
Other checks not run Not run in this review

Findings

Blocking

  • core/libs/prx/libSceIcu/Converter.cpp:116 scans name until a NUL without a bound on the scan itself. If a guest passes a non-terminated char16_t buffer, the wrapper reads beyond that buffer before it can reject a long name. Bound the scan by the maximum supported name length and return ICU’s illegal-argument status if no terminator is found.

Non-blocking

None.

Not verified

The remaining changed files and build integration were not read in full, and the registered test was not run. The prepared manifest.json lists 11 changed files; source review focused on the three files named above. No other review-folder exclusion list was available.

To get this to a good state

Bound the openU scan and add a test using an unterminated name buffer; then run the registered converter test on a supported full-build platform.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6002871424 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18400#pullrequestreview-6002871424). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-21T04:38:35Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested Changes are required before merge: `ucnv_openU` can read beyond the supplied buffer when given an unterminated name. ## What I ran Reviewed head `2497bdc0c2a80f9d03fb730976aca9bab3db1a0f`. No commands or tests were run; the author reports that the registered test was not run on the full build. Read the prepared description, commits, manifest and diff, plus the complete changed `Converter.cpp`, `Converter.hpp`, and `tests/Converter.cpp` files. Other changed files were present in the review materials but their full source was not read. `files.json` was not available as a review document. ## Results | Check | Result | Note | |---|---|---| | Source review | failed | Unterminated name can overread | | Registered test | not run | Author reports no full-build run | | Other checks | not run | Not run in this review | ## Findings ### Blocking - `core/libs/prx/libSceIcu/Converter.cpp:116` scans `name` until a NUL without a bound on the scan itself. If a guest passes a non-terminated `char16_t` buffer, the wrapper reads beyond that buffer before it can reject a long name. Bound the scan by the maximum supported name length and return ICU’s illegal-argument status if no terminator is found. ### Non-blocking None. ## Not verified The remaining changed files and build integration were not read in full, and the registered test was not run. The prepared `manifest.json` lists 11 changed files; source review focused on the three files named above. No other review-folder exclusion list was available. ## To get this to a good state Bound the `openU` scan and add a test using an unterminated name buffer; then run the registered converter test on a supported full-build platform.
MarcZX10 commented 2026-11-22 08:42:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T08:42:08Z.

Review: DISMISSED


Reviewed — changes requested

Changes are required before merge: fix the failing null-name behavior in ucnv_openU and ensure the new test exercises it.

What I ran

Reviewed head b4de92f5c461d20264d798104ad03d697a985bd4 using the prepared diff and the pinned reader. No build or test commands were run; the author reports the registered full-build test was not run.

Results

Check Result Note
Diff and targeted source review passed Changed implementation and tests read
Build and registered test not run Author reports test was not run
Console behavior not run No console verification supplied

Findings

Blocking

  • core/libs/prx/libSceIcu/Converter.cpp:78: When error is null or already contains a failure, Ready(error) is false and ucnv_openU returns nullptr before checking a null name. With a successful status, the same null name throws NotImplemented_nid_no_patch. This makes handling of the explicitly unsupported default converter depend on the incoming status and bypasses ICU's normal preexisting-error handling. Check and handle the null name consistently before the early return; add coverage for null name with null and failed status.

Non-blocking

None.

Not verified

The author reports syntax-only checks, convention checks, public-header audit, and a temporary host harness; these were not run for this review. The full-build test and physical-console behavior were not verified. Read: CMakeLists.txt, Converter.cpp, Converter.hpp, Export.cpp, LegacyExports.cpp, InventoryExports.hpp, LegacyExports.hpp, libSceIcu.hpp, tests/Converter.cpp, and both changed debt fragments. The prepared diff, description, commits, manifest, and review folder listing were also read. No changed file was excluded from review.

To get this to a good state

Handle the null openU name consistently for every incoming status and add tests for the null and failed-status cases. Then run the registered guest_icu_converter test on a supported full-build platform.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6011307897 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18400#pullrequestreview-6011307897). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-22T08:42:08Z. **Review:** DISMISSED --- # Reviewed — changes requested Changes are required before merge: fix the failing null-name behavior in `ucnv_openU` and ensure the new test exercises it. ## What I ran Reviewed head `b4de92f5c461d20264d798104ad03d697a985bd4` using the prepared diff and the pinned reader. No build or test commands were run; the author reports the registered full-build test was not run. ## Results | Check | Result | Note | |---|---|---| | Diff and targeted source review | passed | Changed implementation and tests read | | Build and registered test | not run | Author reports test was not run | | Console behavior | not run | No console verification supplied | ## Findings ### Blocking - `core/libs/prx/libSceIcu/Converter.cpp:78`: When `error` is null or already contains a failure, `Ready(error)` is false and `ucnv_openU` returns `nullptr` before checking a null name. With a successful status, the same null name throws `NotImplemented_nid_no_patch`. This makes handling of the explicitly unsupported default converter depend on the incoming status and bypasses ICU's normal preexisting-error handling. Check and handle the null name consistently before the early return; add coverage for null name with null and failed status. ### Non-blocking None. ## Not verified The author reports syntax-only checks, convention checks, public-header audit, and a temporary host harness; these were not run for this review. The full-build test and physical-console behavior were not verified. Read: `CMakeLists.txt`, `Converter.cpp`, `Converter.hpp`, `Export.cpp`, `LegacyExports.cpp`, `InventoryExports.hpp`, `LegacyExports.hpp`, `libSceIcu.hpp`, `tests/Converter.cpp`, and both changed debt fragments. The prepared diff, description, commits, manifest, and review folder listing were also read. No changed file was excluded from review. ## To get this to a good state Handle the null `openU` name consistently for every incoming status and add tests for the null and failed-status cases. Then run the registered `guest_icu_converter` test on a supported full-build platform.
MarcZX10 commented 2026-11-25 12:27:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T12:27:59Z.

Review: COMMENTED


Reviewed — no blocking findings

Nothing blocks this change; the full-build converter test was not run, so formal approval is not justified.

What I ran

Reviewed head a9f909275fd28c569664fb7fecc8fb90931227fc using the prepared diff and the pinned repository reader, repo_read.py. No tests or build checks were run by this review.

Results

Check Result Note
Diff and targeted source review passed Converter wrappers and tests inspected
Full-build converter test not run Author reports it was not run
Other author-reported checks not run Not independently verified

Findings

Blocking

None.

Non-blocking

None.

Not verified

The full-build guest_icu_converter test, host harness, syntax checks, conventions check, public-header audit, and console behavior were not independently run. Read: description.md, commits.md, manifest.json, diff.patch, core/libs/prx/libSceIcu/Converter.cpp, core/libs/prx/libSceIcu/Converter.hpp, core/libs/prx/libSceIcu/tests/Converter.cpp, core/libs/prx/libSceIcu/CMakeLists.txt, and core/libs/prx/libSceIcu/libSceIcu.hpp. All changed paths listed by the review folder were included; files.json was not available as a review document.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6057590333 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18400#pullrequestreview-6057590333). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-25T12:27:59Z. **Review:** COMMENTED --- # Reviewed — no blocking findings Nothing blocks this change; the full-build converter test was not run, so formal approval is not justified. ## What I ran Reviewed head `a9f909275fd28c569664fb7fecc8fb90931227fc` using the prepared diff and the pinned repository reader, `repo_read.py`. No tests or build checks were run by this review. ## Results | Check | Result | Note | |---|---|---| | Diff and targeted source review | passed | Converter wrappers and tests inspected | | Full-build converter test | not run | Author reports it was not run | | Other author-reported checks | not run | Not independently verified | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified The full-build `guest_icu_converter` test, host harness, syntax checks, conventions check, public-header audit, and console behavior were not independently run. Read: `description.md`, `commits.md`, `manifest.json`, `diff.patch`, `core/libs/prx/libSceIcu/Converter.cpp`, `core/libs/prx/libSceIcu/Converter.hpp`, `core/libs/prx/libSceIcu/tests/Converter.cpp`, `core/libs/prx/libSceIcu/CMakeLists.txt`, and `core/libs/prx/libSceIcu/libSceIcu.hpp`. All changed paths listed by the review folder were included; `files.json` was not available as a review document. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-27 16:37:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-27T16:37:34Z.

Review: COMMENTED


Reviewed — no blocking findings

The targeted code review found no verified blocking defect; the new converter test and platform build checks were not run in this review.

What I ran

Reviewed head 5688f18360dbea9518ab3ae32e9ddafaadbd98e8 from the prepared diff and pinned repository reader. No build or test command was run.

Results

Check Result Note
Diff and targeted source review passed Implementation, exports, build registration, tests, and debt updates inspected
Build and tests not run The description reports the registered test was not run

Negative control

Not run in this review. The description reports six of eight hand mutations failed a temporary host harness; that harness was not run here.

Findings

Blocking

None.

Non-blocking

Nothing required; running guest_icu_converter on Linux or Windows would add evidence for the new behavior.

Sources

Reviewed the prepared diff and repository files at the pinned head. No external sources used.

Not verified

The new converter test, platform builds, and physical console behavior were not verified here. Read: Converter.cpp, Converter.hpp, tests/Converter.cpp, CMakeLists.txt, libSceIcu.hpp, Export.cpp, include/InventoryExports.hpp, docs/dev/debt/changes/feat-icu-ucnv.md, docs/dev/debt/changes/feat-icu-ulist.md, plus the relevant changed hunks in LegacyExports.cpp and include/LegacyExports.hpp. All changed files listed in the manifest were included; the full texts of the latter two legacy export files were not read. Excluded files: none.

To get this to a good state

Nothing is required. The optional point above is to run the new test on Linux or Windows.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6091074268 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18400#pullrequestreview-6091074268). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-27T16:37:34Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The targeted code review found no verified blocking defect; the new converter test and platform build checks were not run in this review. ## What I ran Reviewed head `5688f18360dbea9518ab3ae32e9ddafaadbd98e8` from the prepared diff and pinned repository reader. No build or test command was run. ## Results | Check | Result | Note | |---|---|---| | Diff and targeted source review | passed | Implementation, exports, build registration, tests, and debt updates inspected | | Build and tests | not run | The description reports the registered test was not run | ## Negative control Not run in this review. The description reports six of eight hand mutations failed a temporary host harness; that harness was not run here. ## Findings ### Blocking None. ### Non-blocking Nothing required; running `guest_icu_converter` on Linux or Windows would add evidence for the new behavior. ## Sources Reviewed the prepared diff and repository files at the pinned head. No external sources used. ## Not verified The new converter test, platform builds, and physical console behavior were not verified here. Read: `Converter.cpp`, `Converter.hpp`, `tests/Converter.cpp`, `CMakeLists.txt`, `libSceIcu.hpp`, `Export.cpp`, `include/InventoryExports.hpp`, `docs/dev/debt/changes/feat-icu-ucnv.md`, `docs/dev/debt/changes/feat-icu-ulist.md`, plus the relevant changed hunks in `LegacyExports.cpp` and `include/LegacyExports.hpp`. All changed files listed in the manifest were included; the full texts of the latter two legacy export files were not read. Excluded files: none. ## To get this to a good state Nothing is required. The optional point above is to run the new test on Linux or Windows.
MarcZX10 commented 2026-11-29 16:24:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-29T16:24:16Z.

Review: COMMENTED


Reviewed — comments

The converter implementation and registered test are reviewed at head 5c528b6580213693db59b13118e9ae5b3ec38f24; the full build test was not run, so a formal approval is not justified.

What I ran

Read the prepared diff and changed files at the pinned head. No commands or tests were run.

Results

Check Result Note
Source review passed Changed source and test read
Registered test not run Author reports it was not run
Full build not run Not run during this review

Findings

Blocking

None.

Non-blocking

None.

Not verified

The registered converter test, full build, and console behavior were not run. All files listed as reviewed in the manifest were included; no files were excluded by rule. Read: CMakeLists.txt, Converter.cpp, Converter.hpp, Export.cpp, LegacyExports.cpp, InventoryExports.hpp, LegacyExports.hpp, libSceIcu.hpp, tests/Converter.cpp, and the two debt change fragments.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6103735748 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18400#pullrequestreview-6103735748). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-29T16:24:16Z. **Review:** COMMENTED --- # Reviewed — comments The converter implementation and registered test are reviewed at head `5c528b6580213693db59b13118e9ae5b3ec38f24`; the full build test was not run, so a formal approval is not justified. ## What I ran Read the prepared diff and changed files at the pinned head. No commands or tests were run. ## Results | Check | Result | Note | |---|---|---| | Source review | passed | Changed source and test read | | Registered test | not run | Author reports it was not run | | Full build | not run | Not run during this review | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified The registered converter test, full build, and console behavior were not run. All files listed as reviewed in the manifest were included; no files were excluded by rule. Read: `CMakeLists.txt`, `Converter.cpp`, `Converter.hpp`, `Export.cpp`, `LegacyExports.cpp`, `InventoryExports.hpp`, `LegacyExports.hpp`, `libSceIcu.hpp`, `tests/Converter.cpp`, and the two debt change fragments. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-12-03 06:26:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-03T06:26:17Z.

Review: COMMENTED


Reviewed — no blocking findings

Nothing blocks this; the points below are optional.

What I ran

Reviewed head 080019f2da9450d4c888939b29be4057c639f0ee against the prepared diff and the pinned reader. I inspected the changed converter implementation, declarations, tests, export removals, build registration, and debt updates. No executable checks were run.

repo_read.py cat core/libs/prx/libSceIcu/Converter.cpp 1 267
sed -n '200,267p' files/core/libs/prx/libSceIcu/Converter.cpp
sed -n '364,875p' diff.patch

Results

Check Result Note
Diff and source review passed 12 reviewed files; no excluded files
Registered integration test not run Full-build test; author reports it was not run
Console behavior not run No console verification reported

Negative control

Not run. The reported mutation checks used a temporary host harness; I did not independently verify them.

Findings

Blocking

None.

Non-blocking

  • The registered guest_icu_converter integration test was not run in the full build. Running it on Linux or Windows would add coverage for the registered target and its project integration. The PR reports a temporary host harness passed, but that result was not independently verified. CMakeLists.txt:786

Sources

Not verified

No full build, registered test, or console run was performed. The author-reported syntax checks, conventions audit, temporary host harness, and mutation checks were not independently run. The review folder listed all 12 changed files as reviewed and none as excluded; I read the changed hunks and relevant file text.

To get this to a good state

Nothing is required. Optional: run guest_icu_converter in a supported Linux or Windows full build.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6164701050 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18400#pullrequestreview-6164701050). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-12-03T06:26:17Z. **Review:** COMMENTED --- # Reviewed — no blocking findings Nothing blocks this; the points below are optional. ## What I ran Reviewed head `080019f2da9450d4c888939b29be4057c639f0ee` against the prepared diff and the pinned reader. I inspected the changed converter implementation, declarations, tests, export removals, build registration, and debt updates. No executable checks were run. ```text repo_read.py cat core/libs/prx/libSceIcu/Converter.cpp 1 267 sed -n '200,267p' files/core/libs/prx/libSceIcu/Converter.cpp sed -n '364,875p' diff.patch ``` ## Results | Check | Result | Note | |---|---|---| | Diff and source review | passed | 12 reviewed files; no excluded files | | Registered integration test | not run | Full-build test; author reports it was not run | | Console behavior | not run | No console verification reported | ## Negative control Not run. The reported mutation checks used a temporary host harness; I did not independently verify them. ## Findings ### Blocking None. ### Non-blocking - The registered `guest_icu_converter` integration test was not run in the full build. Running it on Linux or Windows would add coverage for the registered target and its project integration. The PR reports a temporary host harness passed, but that result was not independently verified. [CMakeLists.txt:786](https://github.com/boykopovar/AnyPS5/blob/080019f2da9450d4c888939b29be4057c639f0ee/core/libs/prx/libSceIcu/CMakeLists.txt#L786) ## Sources - [Converter implementation at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/080019f2da9450d4c888939b29be4057c639f0ee/core/libs/prx/libSceIcu/Converter.cpp) - [Converter integration test at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/080019f2da9450d4c888939b29be4057c639f0ee/core/libs/prx/libSceIcu/tests/Converter.cpp) ## Not verified No full build, registered test, or console run was performed. The author-reported syntax checks, conventions audit, temporary host harness, and mutation checks were not independently run. The review folder listed all 12 changed files as reviewed and none as excluded; I read the changed hunks and relevant file text. ## To get this to a good state Nothing is required. Optional: run `guest_icu_converter` in a supported Linux or Windows full build.
ligmaSec commented 2026-12-03 11:54:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T11:54:26Z.

Review: COMMENTED


Compiled the changed converter implementation with the branch’s Converter fixture against the existing Linux PRXs. It passed converter opening, both UTF-16 conversion directions, substitution, streaming, and unsupported converter cases.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6169236976 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18400#pullrequestreview-6169236976). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T11:54:26Z. **Review:** COMMENTED --- Compiled the changed converter implementation with the branch’s `Converter` fixture against the existing Linux PRXs. It passed converter opening, both UTF-16 conversion directions, substitution, streaming, and unsupported converter cases. AI-assisted: yes.
MarcZX10 commented 2026-12-04 08:33:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-04T08:33:46Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The ucnv_getSubstChars wrapper dereferences length before validating it, so a null argument can crash the process.

What I ran

Reviewed head 352e440f51c24174ff7bcfb031b21856764bc74e. I inspected the prepared diff and staged file texts; no build or test was run. The pinned reader could not provide repository context because it tried to write its read log in the read-only run folder.

grep '^diff --git' diff.patch
sed -n '105,175p' files/core/libs/prx/libSceIcu/Converter.cpp
sed -n '200,408p' files/core/libs/prx/libSceIcu/tests/Converter.cpp
python3 repo_read.py search 'APS5_INVALID_ARG_EX' core/libs/prx/libSceIcu

Results

Check Result Note
Diff and staged file review passed 12 changed files inspected
Pinned repository context not run Reader log write was denied
Build and tests not run No compilation or execution

Negative control

Not run; no test was run.

Findings

Blocking

  • core/libs/prx/libSceIcu/Converter.cpp:161: *length is evaluated before Required(length) at line 160. Passing a null length pointer therefore dereferences null instead of throwing std::invalid_argument as the wrapper's validation intends. Validate length before this read, and cover the null case.

Non-blocking

None.

Sources

Not verified

No tests, build, console behavior, or repository-only callers were verified. The author's reported harness and syntax checks were not run here. files.json lists no excluded changed files.

To get this to a good state

Validate length before dereferencing it in ucnv_getSubstChars, then add or update coverage for a null length pointer.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6185836346 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18400#pullrequestreview-6185836346). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-12-04T08:33:46Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The `ucnv_getSubstChars` wrapper dereferences `length` before validating it, so a null argument can crash the process. ## What I ran Reviewed head `352e440f51c24174ff7bcfb031b21856764bc74e`. I inspected the prepared diff and staged file texts; no build or test was run. The pinned reader could not provide repository context because it tried to write its read log in the read-only run folder. ```text grep '^diff --git' diff.patch sed -n '105,175p' files/core/libs/prx/libSceIcu/Converter.cpp sed -n '200,408p' files/core/libs/prx/libSceIcu/tests/Converter.cpp python3 repo_read.py search 'APS5_INVALID_ARG_EX' core/libs/prx/libSceIcu ``` ## Results | Check | Result | Note | |---|---|---| | Diff and staged file review | passed | 12 changed files inspected | | Pinned repository context | not run | Reader log write was denied | | Build and tests | not run | No compilation or execution | ## Negative control Not run; no test was run. ## Findings ### Blocking - `core/libs/prx/libSceIcu/Converter.cpp:161`: `*length` is evaluated before `Required(length)` at line 160. Passing a null `length` pointer therefore dereferences null instead of throwing `std::invalid_argument` as the wrapper's validation intends. Validate `length` before this read, and cover the null case. ### Non-blocking None. ## Sources - [Converter.cpp at the reviewed commit](https://github.com/boykopovar/AnyPS5/blob/352e440f51c24174ff7bcfb031b21856764bc74e/core/libs/prx/libSceIcu/Converter.cpp#L156-L162) ## Not verified No tests, build, console behavior, or repository-only callers were verified. The author's reported harness and syntax checks were not run here. `files.json` lists no excluded changed files. ## To get this to a good state Validate `length` before dereferencing it in `ucnv_getSubstChars`, then add or update coverage for a null length pointer.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/18400:upstream-pr/18400'
git switch 'upstream-pr/18400'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/18400'
git switch 'upstream-pr/18400'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/18400'
git switch 'upstream-pr/18400'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/18400'
git switch 'main'
git merge --squash 'upstream-pr/18400'
git switch 'main'
git merge --ff-only 'upstream-pr/18400'
git switch 'main'
git merge 'upstream-pr/18400'
git push origin 'main'
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!18400
No description provided.