feat(libSceIcu): implement UTF-16 scalar counting and search #10966

Merged
AZLisme merged 3 commits from upstream-pr/10966 into main 2026-11-15 11:52:31 +00:00
AZLisme commented 2026-10-25 11:22:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by AZLisme on 2026-10-25T11:22:27Z.


What

New preserving rebase: 491e27444d83b53bc215a94edf132aee6a4707d7 is based on frozen main 6e9b9134f6ed14e659d870a33118d164096551df, which contains the actual #11760 merge 1dcfe038754ae612ac90cd8ee954deffec1938c4. All 112 inherited sceIcuUnknown_*_nid_no_patch exports continue to throw, and their unverified-prototype debt is retained. The complete upstream ICU implementations, declarations, test registrations and debt are preserved; conflict resolution adds this topic’s debt without replacing the upstream entries. Owned UTF-16 scalar counting and search implementation, declaration and fixture bytes are unchanged from previously published ee4219de0df53ea2470cd7296955c365c62b4ff6. This branch carries only its own topic over main. The actual predecessor #10965 remains required; retain #10961→#10962→#10963→#10964→#10965→#10966→#10967→#11088.

Earlier preserving rebase: ee4219de0df53ea2470cd7296955c365c62b4ff6 on frozen main aebeaa53f54dd4eccfe313f147807e3434588404 includes the actual #10961 merge 2ab073a1e7889d009edaabd84ab8cb10ce829156 and the earlier merged #11013 helpers. All owned implementation, declaration and fixture bytes are unchanged from published 26b0bb142da26cc65d30d55793a8d7ab56f566e9. Shared CMake and umbrella files retain both the inherited unescape source/test/header and this topic; debt retains the exact main entries plus this topic’s existing additions. The immediate predecessor #10965 remains pending; retain #10961→#10962→#10963→#10964→#10965→#10966→#10967→#11088.

Earlier preserving rebase 26b0bb142da26cc65d30d55793a8d7ab56f566e9 is based on the common approved main 6733079b2d01bb25aa1e6e771680da6a17363e3b, after #11013 actually merged as bd1b31548c4f8a21de87b3856b881083ca80492a. The complete parent invariant/version implementations, canonical headers, guest_icu_version source/registration and debt entry are retained. The scalar implementation, five declarations and complete guest_icu_utf16 fixture are byte-identical to the published 691a5dc13094 source. Only CMake, umbrella-header and debt integration required conflict resolution; both original commits remain. The immediate predecessor remains #10965 and the agreed ICU landing order is unchanged.

Implement the missing u_countChar32, u_strHasMoreChar32Than, u_strchr32, u_strrchr32 and u_memchr32 UTF-16 scalar APIs. Preserve paired and isolated surrogate behavior, bounded embedded NULs, truncated pairs, scalar boundaries, invalid scalar rejection and source-defined null/no-read paths. Export declarations live once in Api.hpp, reachable from libSceIcu.hpp; implementation and tests include the canonical interface.

Behavior and types follow pinned ICU 78.1 ustring.h, ustring.cpp and umachine.h. Names/NIDs are in the PS5 3.20 inventory. ABI equivalence on console hardware, firmware availability/routing and undefined input contracts remain documented debt. No new third-party dependency.

Merge order follows #10965: these topics change the same library CMake, canonical-header and debt integration files. I own both branches and will rebase this one after its predecessor merges, preserving both implementations.

BunnyFl’s firmware 13.42 report records u_getVersion returning 78.1.0.0 with system_ex/common_ex/lib/libSceIcu.sprx executed under an emulator. u_countChar32 matched this implementation in 94,111 bounded cases covering null text, lengths -2/-1 and explicit limits, NULs and surrogate boundaries, with text placed at mapping boundaries. The other four APIs (u_strHasMoreChar32Than, u_strchr32, u_strrchr32, u_memchr32) are absent from that native module’s exports. They remain available here for compatibility with the older 3.20 inventory. The report does not establish execution on console hardware or general availability/routing across firmware versions.

Tested

2026-11-01 Windows CI: run 41295118343, 6ee2b5b100aa46aaa68eaf2459f363e5e1a3e996 + main 26fa1212b82f76dd49cf12d65e445d6ff3e0844c: 1,679 selected CTests passed, 904 skipped, zero failed. All 9 ICU cases passed, including guest_icu_utf16. The production ICU module built, linked and was NID-patched. This is the fixed single-PR integration, not the six-topic Windows union. General full-suite, skip-audit and header CTests were not run; native ABI/context/unload, existing dependencies, CI and review gates remain.

2026-11-01: preserving rebase 6ee2b5b100aa46aaa68eaf2459f363e5e1a3e996 onto fixed main 26fa1212b82f76dd49cf12d65e445d6ff3e0844c. Linux GCC 16.2.1 Release: baseline 61 plain + 4 logging-enabled runtime CTests; private SIG-plus-six-ICU union 4908848dab02fb1f0a9fad7e9525ddb8a628177a 71 + 6. All passed, with 65 public-header tests per side. Relevant: guest_icu_utf16. Scope is this fixed baseline/private composition; bare heads, later main, Windows, native ABI and unloading remain unqualified. Earlier results retain their original scope.

2026-10-30 fresh Linux integration check on fixed main 0362b1521c4ee08eeeccc2f98e9987e36fca9ea1: a separate private candidate 8a5c8c499f0e0a157bd110430c1d99ee73bb0d47 (tree 620649fa8b0512d9c7e114c670342a691fd1433a) combines #10953 at 581d45c282371af828efec2a8cec6f43beacc68a with the same six unchanged published ICU heads recorded in the earlier converter-callback integration update. No public branch was rebased by this check.

Fresh native Linux x86-64 Release builds passed 53/53 selected plain runtime CTests on that main baseline and 63/63 on the private candidate. With ANYPS5_LOG_FILE set before process startup, another 4/4 baseline and 6/6 candidate runtime executions passed. Together these are 126 runtime CTest executions; both lanes also passed 65/65 public-header checks, 130 header executions total, with zero failed, skipped or Not Run rows. The candidate ran all 13 registered ICU fixtures, including both guest-memory protection fixtures; converter callbacks ran in both lanes. The selected integration set also exercises logging, heap/allocator, signal, exception and thread behavior.

Production NID patching and readelf/nm inspection found the baseline’s four converter-callback NIDs and all 39 targeted candidate NIDs; this is artifact evidence, not patched-loader functional coverage. Twelve separately observed controlled std::abort child runs returned the expected exit 3; they are not additional CTests or proof of native signal-context behavior. Source and dependency identities were checked before and after execution.

These results apply only to the fixed baseline and private SIG-plus-six-ICU candidate. They add no bare-public-head, later-main, Windows, native-ABI, full-suite, GPU or unload qualification. Earlier results keep their original inputs and scope. The existing predecessor, preserving-rebase, maintainer CI and review requirements and agreed ICU landing order still apply.

2026-10-30 converter-callback integration update: #12692 actually merged as 91a69952c100 (topic 207ac4b5ecfe). Against pinned main 08a10d225306ad102b57408e2ef7566bcfb829b2, all six published ICU heads remain independently clean to integrate; this source review found no duplicate implementation, new dependency or individually required rebase. A separate private all-six union, 6e174798251592474dd94c61975655b409b9c2e9 (tree 446a6e346d3c6fac2e19e358d4376376778c7ae9), preserves 35 owned helpers, the four landed converter callbacks and 13 source-registered ICU fixtures through routine shared-file resolutions; the 98 unknown stubs remain unchanged.

Exact published inputs: #10962 bbccec1140eeccb5adf61f7c497791b183c1bf93, #10963 28cc96f3be1e16d2e3f098b0ae5b77b4fea85e09, #10964 4360e8f85b0bbd184199d9a3822dc30a8bd5f81e, #10965 c2076fe30ee3442546af395930defd74b7bfac2a, #10966 491e27444d83b53bc215a94edf132aee6a4707d7, #10967 babf2bc72012bd926f35408b3d602d162a5ecd1b.

Fresh native Linux x86-64 Release, GCC 16.2.1: the pinned08a main baseline passed 18/18 selected runtime cases and 65/65 public-header checks; the exact private all-six union passed 26/26 runtime cases and 65/65 headers, with zero failures, skips or Not Run rows. The union executed all 13 ICU fixtures, including guest_icu_copy_guest_memory and guest_icu_utf_memory, alongside 13 heap/allocator cases; the converter-callback fixture passed in both lanes. Production NID patching plus readelf/nm inspection verified the four callback NIDs in the baseline and all 39 targeted NIDs in the union (35 owned helpers plus four callbacks). This last check is artifact inspection, not patched-module loader runtime or native-ABI proof.

These results cover only that fixed baseline and private all-six union, not any bare published head, later main, Windows/native ABI, all-nine integration, full suite, title or GPU behavior. Earlier main750 and other historical results retain their original inputs and scope. The declared order remains #10962, #10963, #10964, #10965, #10966, #10967, then #11088; the already merged #12692 adds no new prerequisite. Actual #10965 merge must come first, followed by a preserving rebase, fresh integration checks and re-review before this PR lands.

Current exact-head validation: 491e27444d83b53bc215a94edf132aee6a4707d7 on frozen main 6e9b9134f6ed14e659d870a33118d164096551df: Linux x86-64, normal-root Release, BUILD_TESTING=ON. guest_icu_version, guest_icu_unescape, guest_icu_utf16 passed 3/3; all 65/65 normal public-header CTests passed, with no failed or skipped CTest cases. The complete ICU provider and registered fixtures were built for this standalone branch. The common core was freshly built from this main once; this lane retained 190 objects only after matching their exact compiler commands, complete observed input hashes and object digests, and rebuilt or added 7 objects. Source identity before/after testing and the actual fixture/provider paths were verified. Conventions, whitespace and source-preservation checks pass.

These results cover this standalone Linux component/header build. New-head native Windows, macOS, PS5, sanitizer and full-product CI remain untested here; historical platform and private-composition evidence retains its recorded source scope. The declared predecessor and agreed ICU landing order remain required.

All results below are historical and retain their stated head, base, platform and provenance. Earlier uses of “current”, “fresh”, “now” or “this rebased head” within those retained source-bound entries refer to the named historical revision. They supply no new-head Windows, macOS, physical-PS5, sanitizer, full-product or private-composition runtime credit. Existing actual-predecessor, integration, review and applicable full-CI gates remain.

Earlier exact-head validation: ee4219de0df53ea2470cd7296955c365c62b4ff6 on frozen main aebeaa53f54dd4eccfe313f147807e3434588404: Linux x86-64, Release, BUILD_TESTING=ON. Fresh normal-root CMake builds compiled 196 objects for this independent provider’s core, complete ICU module and fixtures, with compiler caching disabled and no copied prior core/module/test binaries. Registered guest_icu_version, guest_icu_unescape, guest_icu_utf16 passed 3/3, and all 65/65 actual public-header CTests passed, with zero skips or failures. The declaration audit reports 368 libraries and 12,814 exports. Provider linkage resolves the ICU/libc/kernel PRXs from this fresh build. Existing pinned dependency source materializations and the source-built FFmpeg configuration package were verified separately; they supply no old ICU/core/test runtime results.

Conventions against origin/main at that frozen base, whitespace and exact source-preservation checks pass. These are independent Linux component/header results, with no new native Windows, macOS, PS5, sanitizer, full-product or later-main execution claim. Earlier source/platform/CI/firmware/private-composition entries below retain their original named scopes. The declared predecessor and agreed ICU landing order remain required.

Contributor Windows report: BunnyFl reports exact head 26b0bb142da26cc65d30d55793a8d7ab56f566e9 merged with main 74acfad65b3f0fd4eab653f3a3989d298fba1157, on Windows 11 (10.0.26200), WinLibs GCC 15.2.0 r7 (MinGW-w64 UCRT), Release, BUILD_TESTING=ON. guest_icu_utf16 passed all three ctest -V runs. No main-only control was run because the test calls functions introduced here. The report covers this test and composition; #10965 remains the declared predecessor, with the agreed landing, integration and review gates retained.

Earlier source-only rebase 26b0bb142da26cc65d30d55793a8d7ab56f566e9: exact parent/owned-source preservation, conventions, whitespace and the Python public-header audit are checked. Parent source/header/test files are byte-identical to the approved base. The full parent CMake file is retained before adding the owned source/test block; the complete parent umbrella and debt text are retained before the owned additions. All three owned debt rows, including the firmware 13.42 evidence and its limitations, are preserved verbatim.

Earlier fresh exact-head validation for 26b0bb142da26cc65d30d55793a8d7ab56f566e9 on frozen base 6733079b2d01bb25aa1e6e771680da6a17363e3b: Linux x86-64, GNU 16.2.1, Release, BUILD_TESTING=ON. The complete ICU module and every registered fixture were freshly built through the actual library CMake and original root helper bodies. guest_icu_version, guest_icu_utf16 passed 2/2, with zero failures or skips; this includes the inherited #11013 version test and every owned topic fixture. All five C++ header units passed, covering standalone/repeated inclusion, the umbrella and composition with libc/kernel. The passing declaration audit is reused from the source owner’s exact-head receipt; C++ header compilation is fresh.

The common libc/kernel runtime was freshly built once from that approved base and reused for this independent provider only after all 258 actual core project inputs, normal CMake/helper bodies, copied artifact hashes and provider paths were qualified against this head. Pinned source-built ZArchive/zstd archives were reused after source/hash/pin checks. This validates this independent ICU provider; it is not a seven-topic composite or a fresh core rebuild per branch.

Earlier validation is Linux component evidence. No new native Windows, macOS, PS5, sanitizer, full-product or GPU result is claimed; Windows-only HostWrite-refusal paths were not executed by this Linux lane. Earlier platform, maintainer CI, firmware and private-integration evidence below retains its original head/base scope and does not qualify this rebased head.

Historical evidence through published 691a5dc13094 follows. Its documentation-only equality and reuse statements refer to that earlier revision, not to this new preserving rebase.

Documentation follow-up 691a5dc13094cb10393793d7aa9966483f8f334a records the firmware evidence only. The complete core/libs tree (production code, public headers, CMake and tests) is byte-identical to published 14a8192e3385026cf392c93490915d1e7214b5c4. Conventions and whitespace checks passed for the new documentation head. Existing runtime and header results below are reused from unchanged executable sources; no build, runtime rerun or header compilation was needed for this documentation change.

Linux x86-64, GCC 16.2.1, Release, BUILD_TESTING=ON, based on 63a863d3b07f2457ee1210f1abba1c11409cdff5. The complete changed library builds through its normal CMake in an isolated runtime harness linked to libc/libkernel freshly rebuilt from that base. guest_icu_utf16 passes 1/1 (0.02 s), covering 9,331 short UTF-16 patterns plus embedded NUL, surrogate, truncation, threshold, invalid-scalar, null/no-read and source-preservation cases.

The global public_headers audit passes for 368 libraries and 12,193 exports. Both changed public headers compile standalone and through duplicate inclusion with -Werror. Conventions and git diff --check pass. The historical publication-time overlap command reported no overlap; later shared ICU CMake, umbrella and debt edits still require the recorded integration reconciliation.

Prior implementation validation also passed 4,438,433 independent ICU 78.3 differential checks, including every 16-bit unit and all 2,048 surrogate scalar values with null sources; the rebase changes interface declarations, not that behavior. This is focused runtime validation; a monolithic repository build and Windows, macOS and PS5 execution were not performed.
The existing local eight-topic ICU integration on base 3a2c51afd2, commit 80c95cdb32e1fed5d7cfeb7fb7f26307db2f9c6c, includes current #10965 alias fix 58c283d6890d6faaeeb1ec5bd5fd17908ee1093b. It passed 10/10 runtime tests, preserved all 42 public exports and passed 11 header composition units including all 368 public umbrellas. That runtime/header evidence is reused for this unchanged executable tree; this documentation commit does not rerun it. The agreed landing order is #11013 first, followed by #10961–#10967; this PR retains its immediate predecessor in Depends on.

Archived integration on base 63a863d3, before the current guest-write review fixes, combined all 15 queued ICU topics: 117 exports were preserved, 21/21 runtime tests passed, and 14 header composition units passed, including all 368 library umbrellas in one translation unit. That 21/21 result applies to the archived integration snapshot; it has not been rerun for the current revised branch heads.

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: #10965
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5004255058 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10966). Originally posted by [AZLisme](https://github.com/AZLisme) on 2026-10-25T11:22:27Z. --- ### What **New preserving rebase:** `491e27444d83b53bc215a94edf132aee6a4707d7` is based on frozen main `6e9b9134f6ed14e659d870a33118d164096551df`, which contains the actual #11760 merge `1dcfe038754ae612ac90cd8ee954deffec1938c4`. All 112 inherited `sceIcuUnknown_*_nid_no_patch` exports continue to throw, and their unverified-prototype debt is retained. The complete upstream ICU implementations, declarations, test registrations and debt are preserved; conflict resolution adds this topic’s debt without replacing the upstream entries. Owned UTF-16 scalar counting and search implementation, declaration and fixture bytes are unchanged from previously published `ee4219de0df53ea2470cd7296955c365c62b4ff6`. This branch carries only its own topic over main. The actual predecessor #10965 remains required; retain #10961→#10962→#10963→#10964→#10965→#10966→#10967→#11088. **Earlier preserving rebase:** `ee4219de0df53ea2470cd7296955c365c62b4ff6` on frozen main `aebeaa53f54dd4eccfe313f147807e3434588404` includes the actual #10961 merge `2ab073a1e7889d009edaabd84ab8cb10ce829156` and the earlier merged #11013 helpers. All owned implementation, declaration and fixture bytes are unchanged from published `26b0bb142da26cc65d30d55793a8d7ab56f566e9`. Shared CMake and umbrella files retain both the inherited unescape source/test/header and this topic; debt retains the exact main entries plus this topic’s existing additions. The immediate predecessor #10965 remains pending; retain #10961→#10962→#10963→#10964→#10965→#10966→#10967→#11088. Earlier preserving rebase `26b0bb142da26cc65d30d55793a8d7ab56f566e9` is based on the common approved main `6733079b2d01bb25aa1e6e771680da6a17363e3b`, after #11013 actually merged as `bd1b31548c4f8a21de87b3856b881083ca80492a`. The complete parent invariant/version implementations, canonical headers, `guest_icu_version` source/registration and debt entry are retained. The scalar implementation, five declarations and complete `guest_icu_utf16` fixture are byte-identical to the published `691a5dc13094` source. Only CMake, umbrella-header and debt integration required conflict resolution; both original commits remain. The immediate predecessor remains #10965 and the agreed ICU landing order is unchanged. Implement the missing `u_countChar32`, `u_strHasMoreChar32Than`, `u_strchr32`, `u_strrchr32` and `u_memchr32` UTF-16 scalar APIs. Preserve paired and isolated surrogate behavior, bounded embedded NULs, truncated pairs, scalar boundaries, invalid scalar rejection and source-defined null/no-read paths. Export declarations live once in `Api.hpp`, reachable from `libSceIcu.hpp`; implementation and tests include the canonical interface. Behavior and types follow pinned ICU 78.1 [ustring.h](https://github.com/unicode-org/icu/blob/049e0d6a420629ac7db77256987d083a563287b5/icu4c/source/common/unicode/ustring.h), [ustring.cpp](https://github.com/unicode-org/icu/blob/049e0d6a420629ac7db77256987d083a563287b5/icu4c/source/common/ustring.cpp) and [umachine.h](https://github.com/unicode-org/icu/blob/049e0d6a420629ac7db77256987d083a563287b5/icu4c/source/common/unicode/umachine.h). Names/NIDs are in the [PS5 3.20 inventory](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libSceIcu.c). ABI equivalence on console hardware, firmware availability/routing and undefined input contracts remain documented debt. No new third-party dependency. Merge order follows #10965: these topics change the same library CMake, canonical-header and debt integration files. I own both branches and will rebase this one after its predecessor merges, preserving both implementations. [BunnyFl’s firmware 13.42 report](https://github.com/boykopovar/AnyPS5/pull/10966#issuecomment-6400072800) records `u_getVersion` returning `78.1.0.0` with `system_ex/common_ex/lib/libSceIcu.sprx` executed under an emulator. `u_countChar32` matched this implementation in 94,111 bounded cases covering null text, lengths -2/-1 and explicit limits, NULs and surrogate boundaries, with text placed at mapping boundaries. The other four APIs (`u_strHasMoreChar32Than`, `u_strchr32`, `u_strrchr32`, `u_memchr32`) are absent from that native module’s exports. They remain available here for compatibility with the older 3.20 inventory. The report does not establish execution on console hardware or general availability/routing across firmware versions. ### Tested 2026-11-01 Windows CI: [run 41295118343](https://github.com/boykopovar/AnyPS5/actions/runs/41295118343), `6ee2b5b100aa46aaa68eaf2459f363e5e1a3e996` + main `26fa1212b82f76dd49cf12d65e445d6ff3e0844c`: 1,679 selected CTests passed, 904 skipped, zero failed. All 9 ICU cases passed, including `guest_icu_utf16`. The production ICU module built, linked and was NID-patched. This is the fixed single-PR integration, not the six-topic Windows union. General full-suite, skip-audit and header CTests were not run; native ABI/context/unload, existing dependencies, CI and review gates remain. 2026-11-01: preserving rebase `6ee2b5b100aa46aaa68eaf2459f363e5e1a3e996` onto fixed main `26fa1212b82f76dd49cf12d65e445d6ff3e0844c`. Linux GCC 16.2.1 Release: baseline 61 plain + 4 logging-enabled runtime CTests; private SIG-plus-six-ICU union `4908848dab02fb1f0a9fad7e9525ddb8a628177a` 71 + 6. All passed, with 65 public-header tests per side. Relevant: `guest_icu_utf16`. Scope is this fixed baseline/private composition; bare heads, later main, Windows, native ABI and unloading remain unqualified. Earlier results retain their original scope. 2026-10-30 fresh Linux integration check on fixed main `0362b1521c4ee08eeeccc2f98e9987e36fca9ea1`: a separate private candidate `8a5c8c499f0e0a157bd110430c1d99ee73bb0d47` (tree `620649fa8b0512d9c7e114c670342a691fd1433a`) combines #10953 at `581d45c282371af828efec2a8cec6f43beacc68a` with the same six unchanged published ICU heads recorded in the earlier converter-callback integration update. No public branch was rebased by this check. Fresh native Linux x86-64 Release builds passed 53/53 selected plain runtime CTests on that main baseline and 63/63 on the private candidate. With `ANYPS5_LOG_FILE` set before process startup, another 4/4 baseline and 6/6 candidate runtime executions passed. Together these are 126 runtime CTest executions; both lanes also passed 65/65 public-header checks, 130 header executions total, with zero failed, skipped or Not Run rows. The candidate ran all 13 registered ICU fixtures, including both guest-memory protection fixtures; converter callbacks ran in both lanes. The selected integration set also exercises logging, heap/allocator, signal, exception and thread behavior. Production NID patching and `readelf`/`nm` inspection found the baseline’s four converter-callback NIDs and all 39 targeted candidate NIDs; this is artifact evidence, not patched-loader functional coverage. Twelve separately observed controlled `std::abort` child runs returned the expected exit 3; they are not additional CTests or proof of native signal-context behavior. Source and dependency identities were checked before and after execution. These results apply only to the fixed baseline and private SIG-plus-six-ICU candidate. They add no bare-public-head, later-main, Windows, native-ABI, full-suite, GPU or unload qualification. Earlier results keep their original inputs and scope. The existing predecessor, preserving-rebase, maintainer CI and review requirements and agreed ICU landing order still apply. 2026-10-30 converter-callback integration update: #12692 actually merged as `91a69952c100` (topic `207ac4b5ecfe`). Against pinned main `08a10d225306ad102b57408e2ef7566bcfb829b2`, all six published ICU heads remain independently clean to integrate; this source review found no duplicate implementation, new dependency or individually required rebase. A separate private all-six union, `6e174798251592474dd94c61975655b409b9c2e9` (tree `446a6e346d3c6fac2e19e358d4376376778c7ae9`), preserves 35 owned helpers, the four landed converter callbacks and 13 source-registered ICU fixtures through routine shared-file resolutions; the 98 unknown stubs remain unchanged. Exact published inputs: #10962 `bbccec1140eeccb5adf61f7c497791b183c1bf93`, #10963 `28cc96f3be1e16d2e3f098b0ae5b77b4fea85e09`, #10964 `4360e8f85b0bbd184199d9a3822dc30a8bd5f81e`, #10965 `c2076fe30ee3442546af395930defd74b7bfac2a`, #10966 `491e27444d83b53bc215a94edf132aee6a4707d7`, #10967 `babf2bc72012bd926f35408b3d602d162a5ecd1b`. Fresh native Linux x86-64 Release, GCC 16.2.1: the pinned08a main baseline passed 18/18 selected runtime cases and 65/65 public-header checks; the exact private all-six union passed 26/26 runtime cases and 65/65 headers, with zero failures, skips or Not Run rows. The union executed all 13 ICU fixtures, including `guest_icu_copy_guest_memory` and `guest_icu_utf_memory`, alongside 13 heap/allocator cases; the converter-callback fixture passed in both lanes. Production NID patching plus `readelf`/`nm` inspection verified the four callback NIDs in the baseline and all 39 targeted NIDs in the union (35 owned helpers plus four callbacks). This last check is artifact inspection, not patched-module loader runtime or native-ABI proof. These results cover only that fixed baseline and private all-six union, not any bare published head, later main, Windows/native ABI, all-nine integration, full suite, title or GPU behavior. Earlier main750 and other historical results retain their original inputs and scope. The declared order remains #10962, #10963, #10964, #10965, #10966, #10967, then #11088; the already merged #12692 adds no new prerequisite. Actual #10965 merge must come first, followed by a preserving rebase, fresh integration checks and re-review before this PR lands. <!-- 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. --> **Current exact-head validation:** `491e27444d83b53bc215a94edf132aee6a4707d7` on frozen main `6e9b9134f6ed14e659d870a33118d164096551df`: Linux x86-64, normal-root Release, `BUILD_TESTING=ON`. `guest_icu_version`, `guest_icu_unescape`, `guest_icu_utf16` passed **3/3**; all **65/65** normal public-header CTests passed, with no failed or skipped CTest cases. The complete ICU provider and registered fixtures were built for this standalone branch. The common core was freshly built from this main once; this lane retained 190 objects only after matching their exact compiler commands, complete observed input hashes and object digests, and rebuilt or added 7 objects. Source identity before/after testing and the actual fixture/provider paths were verified. Conventions, whitespace and source-preservation checks pass. These results cover this standalone Linux component/header build. New-head native Windows, macOS, PS5, sanitizer and full-product CI remain untested here; historical platform and private-composition evidence retains its recorded source scope. The declared predecessor and agreed ICU landing order remain required. All results below are historical and retain their stated head, base, platform and provenance. Earlier uses of “current”, “fresh”, “now” or “this rebased head” within those retained source-bound entries refer to the named historical revision. They supply no new-head Windows, macOS, physical-PS5, sanitizer, full-product or private-composition runtime credit. Existing actual-predecessor, integration, review and applicable full-CI gates remain. **Earlier exact-head validation:** `ee4219de0df53ea2470cd7296955c365c62b4ff6` on frozen main `aebeaa53f54dd4eccfe313f147807e3434588404`: Linux x86-64, Release, `BUILD_TESTING=ON`. Fresh normal-root CMake builds compiled 196 objects for this independent provider’s core, complete ICU module and fixtures, with compiler caching disabled and no copied prior core/module/test binaries. Registered `guest_icu_version`, `guest_icu_unescape`, `guest_icu_utf16` passed **3/3**, and all **65/65** actual public-header CTests passed, with zero skips or failures. The declaration audit reports 368 libraries and 12,814 exports. Provider linkage resolves the ICU/libc/kernel PRXs from this fresh build. Existing pinned dependency source materializations and the source-built FFmpeg configuration package were verified separately; they supply no old ICU/core/test runtime results. Conventions against `origin/main` at that frozen base, whitespace and exact source-preservation checks pass. These are independent Linux component/header results, with no new native Windows, macOS, PS5, sanitizer, full-product or later-main execution claim. Earlier source/platform/CI/firmware/private-composition entries below retain their original named scopes. The declared predecessor and agreed ICU landing order remain required. **Contributor Windows report:** [BunnyFl](https://github.com/boykopovar/AnyPS5/pull/10966#issuecomment-6430707442) reports exact head `26b0bb142da26cc65d30d55793a8d7ab56f566e9` merged with main `74acfad65b3f0fd4eab653f3a3989d298fba1157`, on Windows 11 (10.0.26200), WinLibs GCC 15.2.0 r7 (MinGW-w64 UCRT), Release, `BUILD_TESTING=ON`. `guest_icu_utf16` passed all three `ctest -V` runs. No main-only control was run because the test calls functions introduced here. The report covers this test and composition; #10965 remains the declared predecessor, with the agreed landing, integration and review gates retained. Earlier source-only rebase `26b0bb142da26cc65d30d55793a8d7ab56f566e9`: exact parent/owned-source preservation, conventions, whitespace and the Python public-header audit are checked. Parent source/header/test files are byte-identical to the approved base. The full parent CMake file is retained before adding the owned source/test block; the complete parent umbrella and debt text are retained before the owned additions. All three owned debt rows, including the firmware 13.42 evidence and its limitations, are preserved verbatim. Earlier fresh exact-head validation for `26b0bb142da26cc65d30d55793a8d7ab56f566e9` on frozen base `6733079b2d01bb25aa1e6e771680da6a17363e3b`: Linux x86-64, GNU 16.2.1, Release, `BUILD_TESTING=ON`. The complete ICU module and every registered fixture were freshly built through the actual library CMake and original root helper bodies. `guest_icu_version`, `guest_icu_utf16` passed **2/2**, with zero failures or skips; this includes the inherited #11013 version test and every owned topic fixture. All five C++ header units passed, covering standalone/repeated inclusion, the umbrella and composition with libc/kernel. The passing declaration audit is reused from the source owner’s exact-head receipt; C++ header compilation is fresh. The common libc/kernel runtime was freshly built once from that approved base and reused for this independent provider only after all 258 actual core project inputs, normal CMake/helper bodies, copied artifact hashes and provider paths were qualified against this head. Pinned source-built ZArchive/zstd archives were reused after source/hash/pin checks. This validates this independent ICU provider; it is not a seven-topic composite or a fresh core rebuild per branch. Earlier validation is Linux component evidence. No new native Windows, macOS, PS5, sanitizer, full-product or GPU result is claimed; Windows-only HostWrite-refusal paths were not executed by this Linux lane. Earlier platform, maintainer CI, firmware and private-integration evidence below retains its original head/base scope and does not qualify this rebased head. Historical evidence through published `691a5dc13094` follows. Its documentation-only equality and reuse statements refer to that earlier revision, not to this new preserving rebase. Documentation follow-up `691a5dc13094cb10393793d7aa9966483f8f334a` records the firmware evidence only. The complete `core/libs` tree (production code, public headers, CMake and tests) is byte-identical to published `14a8192e3385026cf392c93490915d1e7214b5c4`. Conventions and whitespace checks passed for the new documentation head. Existing runtime and header results below are reused from unchanged executable sources; no build, runtime rerun or header compilation was needed for this documentation change. Linux x86-64, GCC 16.2.1, Release, BUILD_TESTING=ON, based on `63a863d3b07f2457ee1210f1abba1c11409cdff5`. The complete changed library builds through its normal CMake in an isolated runtime harness linked to libc/libkernel freshly rebuilt from that base. `guest_icu_utf16` passes **1/1** (0.02 s), covering 9,331 short UTF-16 patterns plus embedded NUL, surrogate, truncation, threshold, invalid-scalar, null/no-read and source-preservation cases. The global `public_headers` audit passes for 368 libraries and 12,193 exports. Both changed public headers compile standalone and through duplicate inclusion with `-Werror`. Conventions and `git diff --check` pass. The historical publication-time overlap command reported no overlap; later shared ICU CMake, umbrella and debt edits still require the recorded integration reconciliation. Prior implementation validation also passed 4,438,433 independent ICU 78.3 differential checks, including every 16-bit unit and all 2,048 surrogate scalar values with null sources; the rebase changes interface declarations, not that behavior. This is focused runtime validation; a monolithic repository build and Windows, macOS and PS5 execution were not performed. The existing local eight-topic ICU integration on base `3a2c51afd2`, commit `80c95cdb32e1fed5d7cfeb7fb7f26307db2f9c6c`, includes current #10965 alias fix `58c283d6890d6faaeeb1ec5bd5fd17908ee1093b`. It passed 10/10 runtime tests, preserved all 42 public exports and passed 11 header composition units including all 368 public umbrellas. That runtime/header evidence is reused for this unchanged executable tree; this documentation commit does not rerun it. The [agreed landing order](https://github.com/boykopovar/AnyPS5/pull/11013#issuecomment-6400134113) is #11013 first, followed by #10961–#10967; this PR retains its immediate predecessor in Depends on. Archived integration on base `63a863d3`, before the current guest-write review fixes, combined all 15 queued ICU topics: 117 exports were preserved, 21/21 runtime tests passed, and 14 header composition units passed, including all 368 library umbrellas in one translation unit. That 21/21 result applies to the archived integration snapshot; it has not been rerun for the current revised branch heads. ### 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 --> #10965 - [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
MarcZX10 commented 2026-10-25 12:05:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T12:05:14Z.

Review: APPROVED


Reviewed exact head 14a8192e3385026cf392c93490915d1e7214b5c4. The UTF-16 scalar iteration correctly combines only valid lead/trail pairs, leaves isolated surrogates as individual values, observes bounded lengths without reading past the span, and treats the terminator correctly for NUL-terminated searches. The u_strHasMoreChar32Than fast bounds are safe (a UTF-16 span of N units contains between ceil(N/2) and N scalars), with the remaining scan handling exact thresholds. The tests exhaustively enumerate short strings across NUL and surrogate classes and check bounded/NUL-terminated behavior, invalid scalars, null shortcuts, and source preservation. The ICU build/header/debt integration is scoped to this PR and the author records its ordered integration with #10965. Local git diff --check and python3 tools/check_conventions.py --base upstream/main --head refs/review/10966 passed. Hosted eligibility, intake, conventions, labels, and report pass; hosted product jobs were skipped. I have not independently rerun the author-reported Linux runtime suite or ICU differential run, and Windows, macOS, and console behavior remain unverified.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5643131175 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10966#pullrequestreview-5643131175). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-25T12:05:14Z. **Review:** APPROVED --- Reviewed exact head `14a8192e3385026cf392c93490915d1e7214b5c4`. The UTF-16 scalar iteration correctly combines only valid lead/trail pairs, leaves isolated surrogates as individual values, observes bounded lengths without reading past the span, and treats the terminator correctly for NUL-terminated searches. The `u_strHasMoreChar32Than` fast bounds are safe (a UTF-16 span of N units contains between ceil(N/2) and N scalars), with the remaining scan handling exact thresholds. The tests exhaustively enumerate short strings across NUL and surrogate classes and check bounded/NUL-terminated behavior, invalid scalars, null shortcuts, and source preservation. The ICU build/header/debt integration is scoped to this PR and the author records its ordered integration with #10965. Local `git diff --check` and `python3 tools/check_conventions.py --base upstream/main --head refs/review/10966` passed. Hosted eligibility, intake, conventions, labels, and report pass; hosted product jobs were skipped. I have not independently rerun the author-reported Linux runtime suite or ICU differential run, and Windows, macOS, and console behavior remain unverified.
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!10966
No description provided.