feat(libSceIcu): implement UTF-16 comparisons #10963
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10963"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by AZLisme on 2026-10-25T11:22:03Z.
What
Implement
u_strlen,u_strcmp,u_strncmp,u_memcmpandu_memcmpCodePointOrderusing ICU 78.1 semantics and public ABI. Preserve code-unit differences, binary bounds through embedded NULs, surrogate-aware scalar ordering and terminated-string behavior for negative code-point comparison counts. Public declarations are reachable throughlibSceIcu.hpp; no ICU dependency is added.Current head is
458afb0c5e4a6bbd5d4aa21d004674d2bc4a0c58. It incorporates B-Howell's preserving merge32987f92and frozen main1e24993fa3a7da25e8fc27152af654687ba64552, retaining both sides of the CMake conflict and all landed ICU work. The comparison implementation, API header and fixture remain unchanged from the previous public headf2caeb1c.#10962 actually merged on 2026-11-02; the declared prerequisite is fulfilled. This is the next PR in the agreed ICU landing order, followed by #10964 → #10965 → #10966 → #10967. No later open ICU topic is included.
The firmware 13.42 native-module report identifies ICU 78.1 but finds none of these five APIs among that module's exports. These older-inventory compatibility APIs remain; firmware availability/routing, console equivalence and invalid-pointer differences remain documented debt. These scope limitations are not additional repository merge requirements.
Tested
458afb0c5e4a6bbd5d4aa21d004674d2bc4a0c58on frozen main1e24993fa3a7da25e8fc27152af654687ba64552: fresh normal Linux x86-64/GCC 16.2.1 Release build of libc, libkernel, libSceIcu and the original ICU fixtures succeeded. All 16 ICU CTests and 65 public-header CTests passed, with zero failures or skips. This focused Linux build did not build all libraries, patch NIDs or run the patched-library loader test.python3 tools/check_conventions.py --base origin/mainand the topic whitespace check pass.458afb0cwith frozen main1e24993f: 2,198 passed, 1,032 skipped, zero failed across 3,230 unique cases; all 16 ICU tests passed. Normal libraries, NID patching and fixtures actually built in the checked helper. Public-header and patched-library loader CTests were not selected there; the separate skip validator was skipped, so the 1,032 skips remain unexecuted and unaudited. The exact-head contributor-fork Windows job also passed 82/82 unique CTests: 16 ICU, one patched-library loader and 65 public-header tests, zero failures/skips/NotRun. It built the full normal libraries and all 17 original fixture targets, loaded 406 patched libraries with zero failures, and verified source identity, actual test selection/targets and complete JUnit results.f2caeb1cwith frozen main096c4557: 2,022 passed, 957 skipped, zero failed; all 13 then-registered ICU cases passed. Headers and the skip validator were not run there. These historical results retain those inputs; skipped tests remain unexecuted.No title runtime, console/native-firmware ABI or full-suite validation is claimed. Documented firmware/routing gaps remain debt, without adding an unrequested merge requirement.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T11:59:51Z.
Review: APPROVED
Reviewed the five implementations and tests against the pinned ICU 78.1 source, and ran a local differential harness against the installed ICU 72.1 implementation. 12,223,143 exact return-value comparisons matched across 729 short UTF-16 inputs built from NUL, BMP boundaries, and paired/unpaired surrogate units, with counts -7, -1, 0, 1, 2, 3 and 4. This covered
u_strlen,u_strcmp,u_strncmp,u_memcmp, andu_memcmpCodePointOrder; the local harness compiled with C++20 and-Wall -Wextra -Werror.git diff --checkand the repository conventions check also pass on this head.No semantic blocker found in this PR. Its declared dependency on #10962 is still open with changes requested, so this approval does not remove that prerequisite; keep the two topics coordinated and land/rebase this integration after the predecessor is resolved. Hosted eligibility, conventions, intake, labels and report checks pass. Product build/test jobs are skipped by repository policy, and the console behavior remains unverified as documented.