feat(libSceIcu): implement 458 more data-free ICU 68 exports #14340
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14340"
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 PrivacyOnion on 2026-11-01T10:05:42Z.
What
Implements 458 more libSceIcu exports that need no ICU data, as reimplementations of ICU 68.2, the version of the 3.20 module (its C++ names are in
icu_68). Builds on #14144 (which includes #14016); this PR adds one commit on top of it and only replaces stubs that #14016 named.ICUService,ICUServiceKey,ICUServiceFactory,SimpleFactory,LocaleKey,LocaleKeyFactory,SimpleLocaleKeyFactory,ICUNotifier,EventListener,ServiceListener,StringPair,LocaleUtilityUnicodeSet(construction from ranges and copies, set algebra on code points, ranges and strings,cloneAsThawed, serialization,toPattern, comparison, hashing),UnicodeSetIterator,UnicodeFilter,UnicodeFunctor,UnicodeMatcher,SymbolTable,UStringSet,ParsePositionLocale(IDs, getters, keywords, copy/assignment, hashing),LocaleBuilder,LocaleBased,uloc_*ID helpersForwardCharacterIterator,CharacterIterator,UCharCharacterIteratorandStringCharacterIteratorobjectsStringEnumeration,UStringEnumeration,uenum_openFromStringEnumerationUVector,UStack,UVector32constructors and destructorsErrorCode,CharStringByteSink,ByteSinkUtil,ICU_Utilityuhash_hashUnicodeString/uhash_compareUnicodeString,utrie2_enum/utrie2_enumForLeadSurrogate,UnicodeString::toUTF8(ByteSink&)and four remainingStringPiece/CharString/MaybeStackArraymembersLayouts follow ICU 68.2 for LP64 and are pinned with
static_assert.UnicodeSetreproduces ICU's multiple inheritance fromUnicodeFilter(UnicodeFunctor+UnicodeMatcher): both vtables and the_ZThn8_thunks are in place. Classes with virtual functions get staticAPS5_VABIvtables and type-info objects in ICU 68.2's slot order.Object.cppnow exposes its__class_type_info,__si_class_type_infoand__vmi_class_type_infotables so derived classes build their own RTTI; no_ZTV/_ZTIexports are added. The new files were written from the ICU 68.2 sources function by function, so each carries ICU's notice (© 2016 and later: Unicode, Inc. and others, http://www.unicode.org/copyright.html) followed by the copyright lines of the ICU files it follows (for example IBM's forlocid.cppandserv.cpp).Still throwing
NotImplemented_nid_no_patchand recorded indocs/dev/debt/libSceIcu.md:\p{…}/[:…:],applyIntPropertyValue,applyPropertyAlias, case closure), locale display names, likely subtags, resource-bundle factories and available-locale lists;UnicodeStringmembers;UnicodeSet::freeze, thespan*calls,applyPattern,applyPatternIgnoreSpace, the pattern constructor andcontainsAll/containsNonewith a string, which needBMPSet,UnicodeSetStringSpanand theRuleCharacterIteratorpattern parser;umutablecptrie_buildImmutable, theudataand format swappers, and theutextproviders for UTF-8,UnicodeString,ReplaceableandCharacterIterator, left for a follow-up.The exports owned by #12320, #13578 and #14123 are left untouched.
Tested
Windows 11, MinGW GCC 13.1. No title run.
release-68-2at84e1f26ea77152936e70d53178a816dbfbf69989, all 196common/*.cppfiles plusstubdata). Each implemented export is called with the same inputs as ICU's: edge cases, fixed-seed random inputs, and random operation sequences of a few hundred calls for classes. Every return value, output buffer,UErrorCodeand object field is compared. All pass except the knownCharStringDiffseparator case from #14144 (the host reference is a Windows build).UnicodeSet(primary andUnicodeMatchervtables),UnicodeSetIterator,ParsePosition,Locale,LocaleBuilder, the service classes, the character iterators, the string enumerations, the vector objects andErrorCode: 0 mismatches. The harnesses and their logs will be attached in a comment, as for #14144.APS5_VABIand the CI flags. The guest build and CTest are left to CI.python3 tools/check_conventions.py --base upstream/mainandpython3 core/libs/tests/test_public_headers.py --audit-onlypass.tools/pr_overlap.pyreports no shared exports. The only shared lines are the libSceIcuCMakeLists.txt,libSceIcu.hppinclude list and debt file.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-11-01T10:12:17Z.
Review: COMMENTED
Tests run and reviewed — evidence requested
The exact head passed the no-build conventions and public-header checks, but the promised differential/layout harnesses and logs for these 458 additions are not attached; I am not approving this change yet.
What I ran
Reviewed head
a922117012130a5b4e0e67dd3abfdbc2dd39a2b8against currentmainat26fa1212b82f76dd49cf12d65e445d6ff3e0844c; dependency and individual merge previews are clean. The incremental diff is one commit after #14144 at919905beb491a418e946e79f4298cc988fb4d15b. Environment: Linux x86-64, Python 3.11.2, GCC 12.2.0 (c++). I did not build locally.Results
UnicodeSet.cppand an extra blank line at the end ofCMakeLists.txtUnedited local check output
Negative control
Findings
Blocking
None established from the source and no-build checks performed so far.
Non-blocking
git diff --checkpasses.Sources
Not verified
I did not run a guest build, CTest, the differential harnesses, or the layout harnesses. The Windows tests and guest ABI object compilation in the PR description are author-reported. No game or console behavior was tested.
To get this to a good state
Attach the new harness sources, build pins/commands, and per-harness logs; remove the whitespace findings. I will re-run the same no-build checks on the refreshed head and reassess the test evidence.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T11:37:09Z.
Review: COMMENTED
Re-checked — new head, no blocking findings
The author asked for a re-review at
f6303c9c46; the whitespace and harness requests from the earlier review are addressed, and the open points are an ICU licence/notice question for the maintainers and the dependency on #14144.What I ran
Reviewed head
f6303c9c4669d5a2fa8efea8dc291ce76acf788c. Incremental diff base919905beb491a418e946e79f4298cc988fb4d15b(the #14144 head that this PR stacks on). PR basee6f57307fa7f47165d7fc1bee945abdb2f6816e7, used for the licence-precedent count. Environment: Linux x86-64, Python 3.11.2. No build, no compile, no CTest run on this machine.The precheck's ABI and test-quality helpers were missing from the isolated head tree, so I ran
tools/pr_abi_audit.pyandtools/pr_test_quality.pyby hand from/marc/AnyPS5/toolsagainst the exact head.Results
919905b..f6303c9ande6f5730..f6303c9(precheck)pr_stack_check.py)windowsjob (run41298866382, job124827010833)mainbefore it builds, so this covers that merge result, not the bare head. The log has the CTest summary100% tests passed, 0 tests failed out of 2631(log line 15642), includingguest_icu_service_key ... Passed.library-portability,conventions,labels,report,eligibilitylinux,relinker,relinker-asan,register-contextandwrite-watchwere skipped.core/libs/prx/libSceIcu/tests/are referenced by name inCMakeLists.txt. The precheck's helper reported 24possible-unregistered-cpp-testfindings; they come from the helper not resolving${CMAKE_CURRENT_SOURCE_DIR}/tests/, so they are false positives.passed_with_warnings: 1906 symbols, 13 lexicalpublic-declaration-not-foundentries and noexport-removedentries for this commit. I traced one entry,Notify, which is a callback intests/ServiceNotifier.cpp; I did not trace the other twelve.assertscanassert(in the 24 new test files.unicode.org/copyrightheader: 0 files at basee6f5730, 124 files at head. Permission-notice text: 0 matches in the head tree.Points raised in oneandonlydean's 10:26 comment, checked in source at this head:
f6303c9LocaleObject.cppdeclaresstd::once_flag CacheOnce;and publishes the cache insidestd::call_once(lines 97 to 100).tests/ServiceKey.cppuses aCheck()that callsstd::abort(), and noassert(remains in the 24 new test files. I read onlyServiceKey.cppin full.LocaleObject.cppkeeps IBM's lines after the Unicode notice; 46 libSceIcu files contain IBM copyright text. I did not check every file.docs/dev/debt/libSceIcu.md: the ICUService entry no longer names a host mutex; the host mutex is described only under ICUNotifier.Author-supplied evidence, not rerun here: the differential and layout harnesses are in a gist (55 files, README pins ICU
release-68-2at84e1f26). 53 of its 54 logs recordDIFF EXIT CODE: 0. The exception isCharStringDiff(exit 1), which the author attributes to the Windows reference build using\as the separator, where the PS5 build uses/.Findings
Blocking
None established from the source, the hosted results and the author's evidence.
Non-blocking
3rdparty/, and this PR adds no submodule. Either the rule does not cover hand ports, or it needs a maintainer decision. The checkbox should match whichever it is.HostAbi.hppdefinesAPS5_VABIas empty and they were built with MinGW on Windows, so they test the host ABI, not the console's. The repository-side evidence is the hosted Windows CTest run above. If the maintainers want the differential evidence to be reproducible, it needs a stable location, either in the repository or linked from the debt file.919905beb4, open,mergeableUNKNOWN). The PR body says it lands after #14123 (open, mergeable). No change is requested now. Re-check after #14144 merges or when the head changes.Sources
LocaleObject.cppheader andCacheOnceuse:github.com/boykopovar/AnyPS5@f6303c9c46/core/libs/prx/libSceIcu/LocaleObject.cppCheck():github.com/boykopovar/AnyPS5@f6303c9c46/core/libs/prx/libSceIcu/tests/ServiceKey.cppgithub.com/boykopovar/AnyPS5@f6303c9c46/docs/dev/debt/libSceIcu.mdgithub.com/boykopovar/AnyPS5@f6303c9c46/CONTRIBUTING.md (L17)github.com/unicode-org/icu@84e1f26ea7/icu4c/LICENSENot verified
Checkaborts with exit code 3 when the expected descriptor is changed topre/abX, under-O2 -DNDEBUG) are author-reported.e6f57307also lists 1695 removed legacy exports. They come from the renames inc516806, which belong to #14016 and #14144; I did not re-verify their NID equality here.Notify.f6303c9.To get this to a good state
Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-11-01T15:08:11Z.
Review: APPROVED
Reviewed
f6303c9c4669d5a2fa8efea8dc291ce76acf788c, focusing on its increment over #14144. No actionable issue found in the reviewed implementation paths.Windows/MSYS2 GCC 16.2 Release: built the shared library and passed all 57 supplied ICU suites in an isolated DLL-linked harness. Independent seeded checks pass 5,000 UnicodeString mutation/copy-on-write rounds, 10,000 integer-vector rounds and 10,000 UnicodeSet range add/remove/complement rounds against simple reference models. Hosted Windows reports 2,631/2,631 selected tests passing. Whitespace and conventions pass.
Local support substitutes minimal libc functions. This is not exhaustive differential validation of all 458 exports, allocation failures or console behavior. Depends on #14144 and its merge ordering; maintainer integration/notice decisions remain with the maintainers.
Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-11-08T20:35:34Z.
Review: COMMENTED
The Windows check on this head now fails in
guest_icu_string_enumeration_objectswith0xc0000409. This is a different result from the passing Windows run on the head I previously approved. The same test fails on the dependent #14443. Please reproduce the enumeration test directly on Windows on this branch so we can isolate the shared failure before testing the dependent branch. Windows jobImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-14T05:22:21Z.
Review: COMMENTED
Reviewed — comments
Nothing blocks this review, but the changes are extensive and I could not inspect every changed file, so a formal approval is not justified.
What I ran
Reviewed the prepared diff and selected changed source. The pinned head is
bb4c8597aa4c45e989efd64483ab5c8a778954ba; no tests or builds were run.Results
Findings
Blocking
None identified in the portions inspected.
Non-blocking
Not verified
Read:
review/description.md,review/commits.md,review/manifest.json,review/README.md, the opening and ending portions ofreview/diff.patch, andcore/libs/prx/libSceIcu/Appendable.cpp.Excluded or not fully read: the remaining changed-file contents and most of the diff, including implementation, tests, build configuration, and debt documentation. The reported host tests, differential harnesses, layout checks, guest ABI compile, and repository checks were not run by this review.
To get this to a good state
Nothing is required. Optional: complete a file-by-file review and run the reported checks at this pinned head.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-15T12:16:07Z.
Review: COMMENTED
Reviewed — no blocking findings
The review is incomplete because the changed implementation and test files were not fully read, so the evidence does not support a formal approval or a blocking finding.
What I ran
d7dd4113e99d085934b0133ceb6e2f42e2bee2b8; no build or tests run.description.md,commits.md, part ofdiff.patch, and the changed-file listing. Sampled one line from four source files.manifest.jsonwas only partially read;files.jsonwas not available as a review-folder file.Results
Findings
Blocking
None verified.
Non-blocking
None.
Not verified
The stated goal is to implement additional data-free ICU 68 exports. Most changed code, all test bodies, and complete manifest exclusion details were not read. The author's reported tests and checks were not independently run; no change-correctness conclusion can be drawn from this partial inspection.
To get this to a good state
Complete the review by reading each changed file's added lines and assessing the relevant code and tests before deciding whether approval or requested changes are justified.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-15T13:27:25Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: fix the signed-byte handling in the bulk
BytesTrie::nextoverload and add coverage for the0xffkey.What I ran
Reviewed head
42a3c5e213066e1868d03594ec5ff13f54bfe9d8from the prepared diff and repository reader. No build or test commands were run. The PR description reports author-run checks; those are not checks I ran.Results
Findings
Blocking
core/libs/prx/libSceIcu/BytesTrie.cpp:1029: the bulknextoverload converts each input byte toint8_t, so byte0xffbecomes-1; unlike the single-byte overload, it does not normalize negative values to the unsigned byte range. The added test atcore/libs/prx/libSceIcu/tests/BytesTrie.cpp:24402currently expects this bulk call to fail, while the same key succeeds through the single-byte overload. Normalize bulk input bytes consistently so valid keys containing bytes0x80–0xffcan be traversed.Non-blocking
None.
Not verified
No build, CTest, guest ABI, or console run was performed. The author’s differential harnesses and layout checks were not independently inspected. The prepared manifest marks changed files as included, but this review did not read every changed file in full; its findings are based on the cited diff lines and targeted review of the trie implementation and test.
To get this to a good state
Normalize signed bytes in the bulk trie traversal, and add a test showing a high-bit key behaves consistently through both
nextoverloads. Re-run the relevant trie tests and build checks on the updated head.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-16T09:41:25Z.
Review: COMMENTED
Reviewed — comments
The review is incomplete because the changed code and tests were not read in full, so a formal merge decision is not justified.
What I ran
No commands were run. I read the prepared description, commit list, review-folder README, file listing, and selected sections of
diff.patch; I did not run the repository reader script or any tests.Results
Negative control
Not run; no tests were run during this review.
Findings
Blocking
None verified.
Non-blocking
No code-level feedback is offered because the changed files were not reviewed in full.
Sources
Read:
review/description.md,review/commits.md,review/README.md,review/manifest.json,review/diff.patch(lines 1–400), and the prepared changed-file listing. No changed repository files were read at the pinned head. No files were listed as excluded by rule in the available listing.Not verified
The full implementation, tests, and integration changes were not read. The prepared bundle lists 140 changed files, but none of their complete changed line sets were reviewed. Tests and checks described by the author were not independently run.
To get this to a good state
Nothing is required. Optional: complete the code review and run the relevant checks before making a formal decision.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T22:49:45Z.
Review: COMMENTED
The trial merge onto
c1601e56d5conflicts in the ICU CMake and inventory files and theStringPiece/UnicodeStringHashcode and tests. The exact head contains #14144. For this layer, please preserve service-factory registration and removal through guest ABI callbacks, including ownership when registration fails. Passing direct service calls in a host fixture does not establish that the guest vtable slots invoke the right methods. Re-run the stacked fixtures and public-header checks on the resolved head.AI-assisted: yes.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.