feat(libSceIcu): implement utext_setup, utext_openUChars and utext_openConstUnicodeString #21959
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/21959"
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 frankea on 2026-11-16T23:04:49Z.
What
Sequencing with #23900. #23900 implements
utext_setup,utext_openUCharsand theconst UChar*provider, along with the genericutext_*operations this branch carries from #14144'sText.cpp. #23900 lands first. Once it is onmain, this branch will mergemainand remove its ownutext_setup,utext_openUChars,UCharprovider and the duplicate generic operations. What remains isutext_openConstUnicodeStringand itsUnicodeStringprovider, ported onto #23900'sUTextandUTextFuncs. The title, tests and debt fragment will then be rewritten for that one export. The stack on #14144 stays, because the provider needs #14144's guestUnicodeString. Until that rework, the description below covers the current diff.Implements three libSceIcu exports that threw
NotImplemented_nid_no_patchinExport.cpp:utext_setup,utext_openUCharsandutext_openConstUnicodeString. They follow ICU 68.2utext.cpp(tagrelease-68-2, commit 84e1f26). The version comes from theicu_68names in the exported symbol names (NID catalogue). None of them needs ICU data, which matters becausemainlinks ICU stubdata (cmake/Icu.cmake).This PR is stacked on #14144 and contains its commits through a merge of its head
bf48caf9910. It uses #14144'sIcu::Text/Icu::TextFunctionslayouts (Text.hpp), its guest-ABI callback convention and its genericutext_*operations, and #14144's 64-byteicu_68::UnicodeString(UnicodeString.hpp) for the string provider. The new commits are the implementation, its tests, one fix to #14144'sutext_getNativeIndex(below) and its test, with merges ofmain; everything before them is #14144.utext_setup(utext.cppL577-L661):UTextit allocates withuprv_malloc, so au_setMemoryFunctionsallocator is used. The size is 144 bytes, or 144 plusextraSpacewhen that is positive. The extra space starts at byte 144, theExtendedUTextoffset under the 16-bytemax_align_tof x86-64. The header isUTEXT_INITIALIZERwithUTEXT_HEAP_ALLOCATED. As in ICU,extraSizeandpExtraare set even when no extra space was asked for. An allocation failure givesU_MEMORY_ALLOCATION_ERRORand null.UTextit checksUTEXT_MAGIC(U_ILLEGAL_ARGUMENT_ERRORotherwise) and calls the old provider'sclosewhen the text is open. It replaces too-small extra space, freeing a separate block first and settingUTEXT_EXTRA_HEAP_ALLOCATED.UTEXT_OPEN, clears the chunk, context,p/q/r,a/b/c, private fields and provider properties, and zeroes the extra space. As in ICU, the function table is kept.utext_openUCharsand its provider (ucstrFuncs, L2347-L2642): null with length 0 opens an empty string. A null string, a length below -1 or aboveINT32_MAXgivesU_ILLEGAL_ARGUMENT_ERRORand null. A length of -1 setsUTEXT_PROVIDER_LENGTH_IS_EXPENSIVE. The provider implements clone, length, access and extract and has no replace or copy:u_terminateUChars;uprv_malloc, NUL-terminated, setsUTEXT_PROVIDER_OWNS_TEXT, and the provider'sclosefrees it. As in ICU 68.2,chunkContentsof the clone still points at the source string.utext_openConstUnicodeStringand its provider (unistrFuncs, L2087-L2330): a bogus string reopens the text as an emptyUChartext, setsU_ILLEGAL_ARGUMENT_ERRORand returns the text that was passed in. Otherwise the text is read only, withUTEXT_PROVIDER_STABLE_CHUNKS, and its chunk is the string's buffer. The provider implements clone, length, access, extract, replace, copy and close:getChar32Start;UnicodeStringwith the copy constructor, owns it, and is writable (if the object cannot be allocated it setsU_MEMORY_ALLOCATION_ERRORand leaves a shallow clone, as theUCharprovider does; ICU 68.2 does not checknewhere), so replace and copy (including a move) work on the copy and update the chunk and index as ICU does. The object is allocated withIcu::Abi::Allocate(hostmalloc), following #14144'sUMemoryconvention forUnicodeStringobjects, so it does not go throughu_setMemoryFunctions;UnicodeStringdeleting destructor.A null text, string or provider table that ICU dereferences throws
std::invalid_argument, as in #14144'sText.cpp. A nullUErrorCodethrowsNotImplemented_nid_no_patchthroughIcu::Failure.Duplicate exports after merging
main.maind51b3dcaedaddeduprv_getUTCtimeanduprv_getRawUTCtimeinUtcTime.cpp, and #14144 defines both inPlatformUtil.cpp, solibSceIcu.prxno longer links (duplicate symbols). The commitfix(libSceIcu): use main's uprv_getUTCtime and uprv_getRawUTCtimeremoves #14144's copies; this is also raised on #14144.In the same way,
mainnow hasu_terminateUCharsandu_terminateWChars(TerminateBuffer.cpp, #22846) andu_uastrcpyandu_uastrncpy(Invariant.cpp, #22862), which #14144 also defines inTerminate.cpp. The commitrefactor(libSceIcu): use main's terminate and uastrcpy helpersremoves #14144's four copies, their declarations and tests, and the providers here callmain'su_terminateUChars. What remained of #14144's file,u_asciiToUpper, moved toAsciiToUpper.cpp; that copy is now gone too (next paragraph), and its test (guest_icu_ascii_to_upper) stays and passes againstmain's implementation.main's tests already cover the removed tests' cases except where the two implementations differ: #14144 took the guestwchar_tofu_terminateWCharsas 4 bytes wheremaintakes 16 bits, and #14144'su_uastrncpywrote a NUL at the destination for a negative count, threw for a null destination with count 0 and forINT32_MIN, wheremainreturns the destination unchanged. Those #14144 checks are dropped with the copies;main's code is not changed here.The 2026-11-20 merge of
mainc8f72e905cfound three more overlaps.maincbe645bd6f(InvariantChars.cpp) wraps ICU'su_asciiToUpper,uprv_toupper,uprv_asciitolower,uprv_ebcdictolower,uprv_stricmp,uprv_strnicmp,uprv_isInvariantStringanduprv_isInvariantUString, which this branch defines inAsciiToUpper.cppand #14144'sPlatformUtil.cpp; the merge keepsmain's and drops this branch's copies,AsciiToUpper.cppand its debt entry.main8f6ac9394a(StringHash.cpp) wraps ICU'sustr_hashUCharsN,ustr_hashCharsNandustr_hashICharsN, which #14144'sHash.cppalso defines (with achar16_tparameter inHash.hpp, so the two declarations conflict in one translation unit).mainac0e9cb0b2(#24383) has since made those wrappers read only the sampled units through checked guest copies and addedtests/StringHash.cpp, so the 2026-11-21 merge ofmainef7dc4452dkeepsmain'sStringHash.cpp, its declarations, itsAvailability.cpptest and debt wording unchanged, and3d572e4c46drops #14144's threeustr_hash*definitions and declarations fromHash.cpp/Hash.hpp; #14144's hash test now checks the sampling stride throughuhash_hashChars, which still usesHash.cpp's own loop.Cleanup.cppandIcuUtility.cpptests now include<initializer_list>directly.The 2026-11-29 merge of
maine0ef70639d(071ba0e086) found three more overlaps.main0a2b81ed60(#20373,HashTable.cpp) implements the same 80-byteUHashtableand everyuhash_*export in #14144'sHash.cpp, so the merge removesHash.cpp,Hash.hpp,tests/Hash.cppand their debt entry and keepsmain's (itsfeat-icu-uhash.mdfragment covers them).main2bb04425d5(#19951,AsciiStrings.cpp) implementsuprv_isASCIILetter, andmain420c6bd97f(InvariantChars.cpp) implementsuprv_ebcdicToAscii,uprv_ebcdicToLowercaseAscii,uprv_aestrncpy,uprv_eastrncpy,uprv_compareInvEbcdicAsAsciianduprv_compareEBCDICPropertyNames; the merge removes these fromPlatformUtil.cpp, andtests/PlatformUtil.cppnow checks them againstmain's code.mainnow hasStringPiece.cppand its test; the merge keepsmain'soperator==beside the constructors,setandcomparehere, and the two tests are one executable. The 2026-12-01 merge ofmain68d65e6b14(d0aac3b35c) had one conflict, inLegacyExports.cpp. #23931 removed theuloc_getDisplayKeywordValuestub (now implemented inDisplayKeywordValue.cpp) that sits next to the_ZN6icu_6811ReplaceableD2Evstub this branch removes (implemented in #14144'sObject.cpp), so both stubs are now gone. No export frommainduplicates one in this branch.Correction to #14144 (
utext_getNativeIndex). #14144's headbf48caf9910changed the direct-index test inText.cppfromchunkOffset <= nativeIndexingLimitto<, as asked in its review. ICU 68.2 uses<=(utext.cpp L102):nativeIndexingLimitis the highest chunk offset that still maps one to one, and a provider'smapOffsetToNativeis only called above it (the UTF-8 provider assertschunkOffset > nativeIndexingLimit, L1541). TheUCharandUnicodeStringproviders have nomapOffsetToNative, as in ICU, so with<utext_getNativeIndexandutext_equalsthrowUText: null provider callbackwhenever the index is at the chunk end: after iterating to the end, and on a freshly opened empty text. The commitfix(libSceIcu): use the direct native index at the chunk end, as ICU doesrestores<=and changes #14144's test of the mapped path tonativeIndexingLimit = 0, the value a provider whose chunk does not map one to one reports. This corrects #14144 and has to be coordinated with its author; it is raised on #14144.utext_closeis not part of this PR and still throws for a non-null text, so a heapUTextfrom these functions cannot be closed through it yet. The new debt entry says so.docs/dev/debt/libSceIcu.md:131(theUText core accessentry) still listsutext_openUnicodeStringwith the providers whose C++ objects are unavailable. With theUnicodeStringprovider here that reason is stale, but the export itself stays a stub in this PR, and #14340 and #14443, which carry that stub, are left to change the note.The debt fragment removes the three rows from the throwing
Export.cpptable and adds aFunctionalentry (965 characters). The count in theAdditional callable exportsentry is already rewritten by the pendinglibSceIcu-locale-syntax.mdfragment, so it is not changed here.Progress (
python3 tools/progress.py --module libSceIcu):main68d65e6b14409/2766, this branch (with #14144 and thatmainmerged) 794/2766. The three exports here count as done.Tested
macOS 27.0.1 on Apple silicon, x86_64 Release build under Rosetta (Ninja, AppleClang). Not run on Linux or Windows, and not on a console.
guest_icu_text_providers(core/libs/tests/GuestIcuTextProviders.cpp) passed at3d572e4c46, and 10 of 10 repeated runs. Since the last revision it also covers aUChardeep clone whose copy allocation fails (statusU_MEMORY_ALLOCATION_ERROR, a shallow clone left, nothing allocated or freed); removing the status write in that path makes it fail at that check. The matchingUnicodeStringpath allocates with hostmalloc, which the test cannot make fail, so it has no test. It installsu_setMemoryFunctionsto count blocks and checks that every block is freed. It covers: heap setup with and without extra space, allocation failure, reuse of a callerUText(old provider closed, extra space grown and zeroed, fields cleared), a second grow that frees the separate extra block before allocating the larger one (control: growing a heapUText's inline extra space frees nothing), bad magic and an incoming failure; counted and NUL-terminatedUChartexts (iteration across surrogate pairs, lazy 32-unit scanning across a split pair, extract snapping, overflow and not-terminated status, preflight with capacity 0 and a null buffer, deep and shallow clones, a deep clone of an unscanned length -1 text that measures it and leaves the source unscanned, and a shallow clone of a text whose context, chunk,pandqpoint into its own extra space and struct, which the clone moves to its own (control: an outsideris kept); andUnicodeStringtexts (extract snapping, preflight with capacity 0 and a null buffer, read-only replace refused, a shallow clone that shares the string and leaves it alive on close, deep clone with replace, copy, move and an overlapping copy refused, bogus string, null string); and the native index andutext_equalsat the chunk end of an emptyUChartext and ofUCharandUnicodeStringtexts iterated to the end. Without theutext_getNativeIndexfix the test aborts on its first chunk-end check withUText: null provider callback; with it, #14144'sguest_icu_textstill passes. Disabling eitherAdjustPointerrange or the extra-block free inutext_setupmakes the test fail at the matching check.mainexports getsutext_setup not implemented,utext_openUChars not implementedandutext_openConstUnicodeString not implemented; all three throw.ctest -R "icu|^public_headers|availability|tools_nid_name_audit|export_gap|conventions_function_bodies"at3d572e4c46(after mergingmainef7dc4452d): 190 of 190 passed, including #14144'sguest_icu_text,guest_icu_hash,guest_icu_cleanupandguest_icu_icu_utilityandmain'sguest_icu_string_hash.071ba0e086): all 128guest_icu_*tests built and run on the Mac, 127 passed.guest_icu_unicode_string_hash(main's #24291 test) fails at its caseless compare of "Hello" and "HELLO" (line 139); it fails the same way onmaine0ef70639dwithout this PR on this Mac, so it is not caused by this PR.d212d30d6b, on the Mac:guest_icu_trie2_testsgainsUnaligned(), which copies a dummy trie of each width to a byte buffer at offset 2 and checksutrie2_get32across the BMP, supplementary, lead-surrogate and out-of-range cases andutrie2_get32FromLeadSurrogateCodeUnit; without7cec53776ait aborts withUTrie2: invalid 32-bit data access.guest_icu_strings_enumeration_testsnow frees the enumeration in its failed-growth case throughuenum_close; with the earlier buffer growth restored it fails at line 90. Both pass. Box (Windows) results for these commits: none.d0aac3b35c), on the Mac:libSceIcu.prxlinks, andctest -R "icu|^public_headers|availability|tools_nid_name_audit|export_gap|conventions_function_bodies"ran 210 tests, 209 passed, includingguest_icu_text_providers,guest_icu_textandmain's newguest_icu_display_keyword_valueandguest_icu_uchars_matcher_type.guest_icu_unicode_string_hashstill fails at line 139, as it does onmainwithout this PR on this Mac (its test and code are unchanged sincee0ef70639d).python3 tools/check_conventions.py --base origin/mainandpython3 tools/debt_fold.py --checkpassed.python3 core/libs/tests/test_public_headers.py --audit-onlypassed.python3 tools/check_conventions.py --base origin/mainpassed.python3 tools/debt_fold.py --checkpassed.python3 tools/pr_overlap.py --names utext_setup utext_openUChars utext_openConstUnicodeString:mainstubs all three. #23900 (open) also implementsutext_setupandutext_openUChars(see Sequencing with #23900). #14340 and #14443 (stacked on #14144) keep all three as stubs.Checklist
main; no other open PR implements the same functions (#23900 overlaps in libSceIcu; this PR lands after it, see Sequencing with #23900)NotImplemented_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)Summary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-16T23:14:46Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
db3c453546:tools/check_conventions.pypassed.guest_icu_appendable_tests,guest_icu_byte_sink_tests,guest_icu_bytes_trie_tests,guest_icu_char_string_tests,guest_icu_character_iterator_tests,guest_icu_cleanup_tests,guest_icu_edits_tests,guest_icu_hash_tests,guest_icu_icu_utility_tests,guest_icu_maybe_stack_array_tests,guest_icu_pattern_props_tests,guest_icu_platformutil_tests,guest_icu_string_piece_tests,guest_icu_strings_enumeration_tests,guest_icu_terminate_tests,guest_icu_text_providers_tests,guest_icu_text_tests,guest_icu_trace_tests,guest_icu_trie2_tests,guest_icu_uchars_trie_tests,guest_icu_unicode_string_tests,guest_icu_vector32_tests,guest_icu_vector_testsbuilt cleanly.guest_icu_hash,guest_icu_strings_enumeration,guest_icu_trace,guest_icu_platformutil,guest_icu_cleanup,guest_icu_terminate,guest_icu_trie2,guest_icu_text,guest_icu_vector,guest_icu_vector32,guest_icu_edits,guest_icu_bytes_trie,guest_icu_uchars_trie,guest_icu_character_iterator,guest_icu_unicode_string,guest_icu_char_string,guest_icu_string_piece,guest_icu_appendable,guest_icu_byte_sink,guest_icu_maybe_stack_array,guest_icu_pattern_props,guest_icu_icu_utility,guest_icu_text_providers):core/libs/prx/libSceIcu/Export.cpp,core/libs/prx/libSceIcu/LegacyExports.cpp,core/libs/prx/libSceIcu/include/InventoryExports.hpp,core/libs/prx/libSceIcu/include/LegacyExports.hpp,core/libs/prx/libSceIcu/libSceIcu.hpp,core/libs/prx/libSceIcu/Appendable.cpp,core/libs/prx/libSceIcu/ByteSink.cpp,core/libs/prx/libSceIcu/BytesTrie.cpp,core/libs/prx/libSceIcu/CharString.cpp,core/libs/prx/libSceIcu/CharacterIterator.cpp,core/libs/prx/libSceIcu/Cleanup.cpp,core/libs/prx/libSceIcu/Edits.cpp,core/libs/prx/libSceIcu/Hash.cpp,core/libs/prx/libSceIcu/IcuUtility.cpp,core/libs/prx/libSceIcu/MaybeStackArray.cpp,core/libs/prx/libSceIcu/Object.cpp,core/libs/prx/libSceIcu/PatternProps.cpp,core/libs/prx/libSceIcu/PlatformUtil.cpp,core/libs/prx/libSceIcu/StringPiece.cpp,core/libs/prx/libSceIcu/StringsEnumeration.cpp,core/libs/prx/libSceIcu/Terminate.cpp,core/libs/prx/libSceIcu/Text.cpp,core/libs/prx/libSceIcu/TextProviders.cpp,core/libs/prx/libSceIcu/Trace.cpp,core/libs/prx/libSceIcu/Trie2.cpp,core/libs/prx/libSceIcu/UCharsTrie.cpp,core/libs/prx/libSceIcu/UnicodeString.cpp,core/libs/prx/libSceIcu/Vector.cpp,core/libs/prx/libSceIcu/Vector32.cppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-17T01:41:35Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
77b6b063c9:tools/check_conventions.pypassed.guest_icu_appendable_tests,guest_icu_byte_sink_tests,guest_icu_bytes_trie_tests,guest_icu_char_string_tests,guest_icu_character_iterator_tests,guest_icu_cleanup_tests,guest_icu_edits_tests,guest_icu_hash_tests,guest_icu_icu_utility_tests,guest_icu_maybe_stack_array_tests,guest_icu_pattern_props_tests,guest_icu_platformutil_tests,guest_icu_string_piece_tests,guest_icu_strings_enumeration_tests,guest_icu_terminate_tests,guest_icu_text_providers_tests,guest_icu_text_tests,guest_icu_trace_tests,guest_icu_trie2_tests,guest_icu_uchars_trie_tests,guest_icu_unicode_string_tests,guest_icu_vector32_tests,guest_icu_vector_testsbuilt cleanly.guest_icu_hash,guest_icu_strings_enumeration,guest_icu_trace,guest_icu_platformutil,guest_icu_cleanup,guest_icu_terminate,guest_icu_trie2,guest_icu_text,guest_icu_vector,guest_icu_vector32,guest_icu_edits,guest_icu_bytes_trie,guest_icu_uchars_trie,guest_icu_character_iterator,guest_icu_unicode_string,guest_icu_char_string,guest_icu_string_piece,guest_icu_appendable,guest_icu_byte_sink,guest_icu_maybe_stack_array,guest_icu_pattern_props,guest_icu_icu_utility,guest_icu_text_providers):core/libs/prx/libSceIcu/Export.cpp,core/libs/prx/libSceIcu/LegacyExports.cpp,core/libs/prx/libSceIcu/include/InventoryExports.hpp,core/libs/prx/libSceIcu/include/LegacyExports.hpp,core/libs/prx/libSceIcu/libSceIcu.hpp,core/libs/prx/libSceIcu/Appendable.cpp,core/libs/prx/libSceIcu/ByteSink.cpp,core/libs/prx/libSceIcu/BytesTrie.cpp,core/libs/prx/libSceIcu/CharString.cpp,core/libs/prx/libSceIcu/CharacterIterator.cpp,core/libs/prx/libSceIcu/Cleanup.cpp,core/libs/prx/libSceIcu/Edits.cpp,core/libs/prx/libSceIcu/Hash.cpp,core/libs/prx/libSceIcu/IcuUtility.cpp,core/libs/prx/libSceIcu/MaybeStackArray.cpp,core/libs/prx/libSceIcu/Object.cpp,core/libs/prx/libSceIcu/PatternProps.cpp,core/libs/prx/libSceIcu/PlatformUtil.cpp,core/libs/prx/libSceIcu/StringPiece.cpp,core/libs/prx/libSceIcu/StringsEnumeration.cpp,core/libs/prx/libSceIcu/Terminate.cpp,core/libs/prx/libSceIcu/Text.cpp,core/libs/prx/libSceIcu/TextProviders.cpp,core/libs/prx/libSceIcu/Trace.cpp,core/libs/prx/libSceIcu/Trie2.cpp,core/libs/prx/libSceIcu/UCharsTrie.cpp,core/libs/prx/libSceIcu/UnicodeString.cpp,core/libs/prx/libSceIcu/Vector.cpp,core/libs/prx/libSceIcu/Vector32.cppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T17:04:56Z.
Review: COMMENTED
Reviewed — no blocking findings
The inspected UText provider and native-index changes show no verified blocking defect, but the review is incomplete because most changed files were not read.
What I ran
No commands or tests were run. I inspected the prepared diff and pinned-head sources using the review reader.
Results
Findings
Blocking
None identified in the files inspected.
Non-blocking
None.
Not verified
Read:
review/description.md,review/commits.md,review/manifest.json, the opening portion ofreview/diff.patch,core/libs/prx/libSceIcu/TextProviders.cpplines 1–150,core/libs/prx/libSceIcu/Text.cpplines 1–150, andcore/libs/tests/GuestIcuTextProviders.cpplines 1–130. The manifest lists 73 changed files; the other changed-file contents and remaining relevant ranges were not reviewed. The author-reported test results were not independently verified. Console behavior and ABI compatibility were not verified.To get this to a good state
Nothing is required. Optional: complete review of the remaining changed files and run the reported checks on this head.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T22:57:40Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this change; the points below are optional.
What I ran
Reviewed head
6a9bb4def042807192e3e3b578c194983df7e220. No build or tests were run. I read the prepared description, commit list, manifest and diff, plus the full source and test files listed below. The description reports macOS tests, but those results were not independently verified here.Results
Findings
Blocking
None.
Non-blocking
Vector::SetSizereturns without changingvector.countfor a negative size, and the test expects this behavior (Vector.cpp:84). Confirm that this matches the ICU 68.2 contract; silently ignoring a bad requested size may conceal a caller error.BytesTrie::nextoverload with explicit length accepts negative inputs below-1, then treats them as NUL-terminated input (BytesTrie.cpp:205). Consider matching the single-byte overload's conversion of negative byte values, or explicitly rejecting unsupported lengths; current tests cover-1and positive lengths, not values below-1.Not verified
No tests or build were run. The description's reported macOS checks and behavior on Linux, Windows, and console hardware were not verified. The change deletes
StringHash.cpp; its prior contents were not available to inspect, so that deletion was not reviewed. All other changed files listed as included in the manifest were read in full, including their test files.To get this to a good state
Nothing is required. Optional: confirm the negative-size
Vector::SetSizebehavior and add coverage forBytesTrie::nextlengths below-1.Sources
Behavior claims above refer to the changed lines in
core/libs/prx/libSceIcu/Vector.cppandcore/libs/prx/libSceIcu/BytesTrie.cppat head6a9bb4def042807192e3e3b578c194983df7e220.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T05:07:53Z.
Review: COMMENTED
Reviewed — comments
Nothing blocks this review, but the clone allocation failure path needs correction before the advertised behavior is reliable.
What I ran
fb0328099326a9e3aca8b3bbeb20c7ba75943013using the prepared diff andrepo_read.py.Results
Findings
Blocking
None.
Non-blocking
core/libs/prx/libSceIcu/TextProviders.cpp:105— If allocating the deep-cloneUnicodeStringfails,copyremains null, but the code stores it as the clone context, marks the clone as owning and writable, and leaves the status successful. Subsequent provider operations dereference that null context. Please setU_MEMORY_ALLOCATION_ERRORand return safely when allocation fails; cover this allocator failure in the clone test.Not verified
TextProviders.cpp,Text.hpp,Text.cpp,Status.hpp, andGuestIcuTextProviders.cpp. I did not read the full texts of the other changed files.To get this to a good state
Nothing is required. Optional: handle the deep-clone allocation failure and add a test for it.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T08:08:16Z.
Review: COMMENTED
Reviewed — no blocking findings
The inspected provider implementation has no verified blocking defect; I could not complete a full review of the very large change set or run checks.
What I ran
Read the prepared description, commits, diff excerpt and the full changed
TextProviders.cppat head3d572e4c4675478a74d002aea68722d6994f3887usingrepo_read.pyreader access. No commands or tests were run.Results
Findings
Blocking
None identified in the inspected code.
Non-blocking
None.
Not verified
Most changed files listed in the manifest were not read, including the broader ICU export implementations and test sources. The full diff was not reviewed and no build or test commands were run. The author-reported test results were not independently verified.
review/files.jsonwas not available through the reader, so the set of files marked reviewed could not be confirmed.To get this to a good state
Complete review of the remaining changed files and run the relevant checks before making a formal approval decision.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-29T05:38:42Z.
Review: COMMENTED
Actionable comments posted: 16
1a8cfc0f-5cd6-4f45-a006-48f34ceaa758Reviewing files that changed from the base of the PR and between
e0ef70639dand071ba0e086.core/libs/prx/libSceIcu/Appendable.cppcore/libs/prx/libSceIcu/Appendable.hppcore/libs/prx/libSceIcu/ByteSink.cppcore/libs/prx/libSceIcu/ByteSink.hppcore/libs/prx/libSceIcu/BytesTrie.cppcore/libs/prx/libSceIcu/BytesTrie.hppcore/libs/prx/libSceIcu/CMakeLists.txtcore/libs/prx/libSceIcu/CharString.cppcore/libs/prx/libSceIcu/CharString.hppcore/libs/prx/libSceIcu/CharacterIterator.cppcore/libs/prx/libSceIcu/CharacterIterator.hppcore/libs/prx/libSceIcu/Cleanup.cppcore/libs/prx/libSceIcu/Cleanup.hppcore/libs/prx/libSceIcu/Edits.cppcore/libs/prx/libSceIcu/Edits.hppcore/libs/prx/libSceIcu/Export.cppcore/libs/prx/libSceIcu/IcuUtility.cppcore/libs/prx/libSceIcu/IcuUtility.hppcore/libs/prx/libSceIcu/LegacyExports.cppcore/libs/prx/libSceIcu/MaybeStackArray.cppcore/libs/prx/libSceIcu/MaybeStackArray.hppcore/libs/prx/libSceIcu/Object.cppcore/libs/prx/libSceIcu/Object.hppcore/libs/prx/libSceIcu/PatternProps.cppcore/libs/prx/libSceIcu/PatternProps.hppcore/libs/prx/libSceIcu/PlatformUtil.cppcore/libs/prx/libSceIcu/PlatformUtil.hppcore/libs/prx/libSceIcu/StringPiece.cppcore/libs/prx/libSceIcu/StringPiece.hppcore/libs/prx/libSceIcu/StringsEnumeration.cppcore/libs/prx/libSceIcu/StringsEnumeration.hppcore/libs/prx/libSceIcu/Text.cppcore/libs/prx/libSceIcu/Text.hppcore/libs/prx/libSceIcu/TextProviders.cppcore/libs/prx/libSceIcu/TextProviders.hppcore/libs/prx/libSceIcu/Trace.cppcore/libs/prx/libSceIcu/Trace.hppcore/libs/prx/libSceIcu/Trie2.cppcore/libs/prx/libSceIcu/Trie2.hppcore/libs/prx/libSceIcu/UCharsTrie.cppcore/libs/prx/libSceIcu/UCharsTrie.hppcore/libs/prx/libSceIcu/UnicodeString.cppcore/libs/prx/libSceIcu/UnicodeString.hppcore/libs/prx/libSceIcu/Vector.cppcore/libs/prx/libSceIcu/Vector.hppcore/libs/prx/libSceIcu/Vector32.cppcore/libs/prx/libSceIcu/Vector32.hppcore/libs/prx/libSceIcu/include/InventoryExports.hppcore/libs/prx/libSceIcu/include/LegacyExports.hppcore/libs/prx/libSceIcu/libSceIcu.hppcore/libs/prx/libSceIcu/tests/Appendable.cppcore/libs/prx/libSceIcu/tests/AsciiToUpper.cppcore/libs/prx/libSceIcu/tests/ByteSink.cppcore/libs/prx/libSceIcu/tests/BytesTrie.cppcore/libs/prx/libSceIcu/tests/CharString.cppcore/libs/prx/libSceIcu/tests/CharacterIterator.cppcore/libs/prx/libSceIcu/tests/Cleanup.cppcore/libs/prx/libSceIcu/tests/Edits.cppcore/libs/prx/libSceIcu/tests/IcuUtility.cppcore/libs/prx/libSceIcu/tests/List.cppcore/libs/prx/libSceIcu/tests/MaybeStackArray.cppcore/libs/prx/libSceIcu/tests/PatternProps.cppcore/libs/prx/libSceIcu/tests/PlatformUtil.cppcore/libs/prx/libSceIcu/tests/StringPiece.cppcore/libs/prx/libSceIcu/tests/StringsEnumeration.cppcore/libs/prx/libSceIcu/tests/Text.cppcore/libs/prx/libSceIcu/tests/Trace.cppcore/libs/prx/libSceIcu/tests/Trie2.cppcore/libs/prx/libSceIcu/tests/UCharsTrie.cppcore/libs/prx/libSceIcu/tests/UnicodeString.cppcore/libs/prx/libSceIcu/tests/Vector.cppcore/libs/prx/libSceIcu/tests/Vector32.cppcore/libs/tests/GuestIcuTextProviders.cppdocs/dev/debt/changes/feat-icu-utext-providers.mddocs/dev/debt/libSceIcu.mdIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-29T05:43:16Z.
Review: COMMENTED
Reviewed — no blocking findings
The UText provider code I inspected has no verified blocking defect, but this review is incomplete because I did not read all changed files or run checks.
What I ran
Reviewed head
071ba0e086bcb3348ef88d4c3189e4ae7578427dusingrepo_read.py. No commands or tests were run. Read the PR description, commit list, manifest, an excerpt of the diff, and the changed filescore/libs/prx/libSceIcu/TextProviders.cpp,core/libs/prx/libSceIcu/Text.cpp, andcore/libs/prx/libSceIcu/tests/Text.cpp. The full text of other changed files was not read. The manifest lists 70 changed files as included; I did not verify whether any files were excluded by rule.Results
Negative control
Not run.
Findings
Blocking
None verified in the inspected code.
Non-blocking
None.
Not verified
The full diff and most changed files—including implementations, tests, and build configuration—were not reviewed. No build, tests, or negative control were run. The reported checks and results in the PR description are author-reported and were not independently confirmed. Console behavior and non-macOS builds were not verified.
To get this to a good state
Complete review of the remaining changed files and run the relevant checks on this head before relying on this review as a merge decision.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-29T07:10:23Z.
Review: COMMENTED
Reviewed — comments
The change implements a broad set of ICU exports, but this review did not inspect every changed file or run the reported checks, so a formal approval is not justified.
What I ran
Read the prepared description, commit list, manifest, diff, and targeted source ranges at head
0b635a9f5ccd5a72d09d116dd77718b2d2163432. No build or tests were run. The author-reported test results were not independently verified.Results
Findings
Blocking
None identified in the sampled code.
Non-blocking
None.
Not verified
The manifest marks all 79 changed files as included. Read the full description, commits, manifest, and diff; read source ranges from
Appendable.cpp,BytesTrie.cpp,Edits.cpp,TextProviders.cpp,CharString.cpp,CharacterIterator.cpp,MaybeStackArray.cpp,Object.cpp,PatternProps.cpp,UnicodeString.cpp,Trie2.cpp,UCharsTrie.cpp,Trace.cpp,PlatformUtil.cpp,Vector32.cpp,StringsEnumeration.cpp, andtests/BytesTrie.cpp. Most changed files, remaining ranges of sampled files, and the complete new test suite were not read.files.jsonwas not available in the review folder, so excluded-by-rule files were not verified. No checks were run in this review; reported macOS results and console behavior were not independently confirmed.To get this to a good state
Nothing is required. Optional: complete review of the remaining changed files and run the relevant checks on this exact head.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-29T17:09:15Z.
Review: COMMENTED
Reviewed — comments
This review covers the prepared change at head
d212d30d6b035ef8cf85ff84abef655a11c0b3e3; the broad change set was only partially inspected, so a formal approval or change request is not justified.What I ran
No tests or build commands were run. I read the prepared description, commit list, manifest, diff excerpt, changed
TextProviders.cppimplementation, and file inventory using the review reader.Results
Findings
Blocking
None identified in the inspected code.
Non-blocking
None identified in the inspected code.
Not verified
The reviewed inventory lists 70 changed files. I read the changed lines of
core/libs/prx/libSceIcu/TextProviders.cpp(lines 366–478), plus the prepared description, commits, manifest, and the opening portion of the diff. The remaining changed files and diff hunks were not read, so their correctness, tests, and build integration are not verified. No local tests, build, platform checks, or console behavior were verified.To get this to a good state
Nothing is required. Optional: complete review of the remaining changed files and run the project checks before relying on this review as a merge assessment.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-02T03:51:32Z.
Review: COMMENTED
Reviewed — no blocking findings
The prepared materials were inspected, but the code review is incomplete because the 75 changed files were not read in full.
What I ran
At head
d0aac3b35c71f181f97ca6ace6f3c40b946b547d, I inspecteddescription.md,commits.md,manifest.json,files.json, and the beginning ofdiff.patch. I ran no code or tests.Results
Negative control
Not run; no tests were run.
Findings
Blocking
None identified in the limited material inspected; this is not a complete code review.
Non-blocking
None.
Sources
No behavior claims are made from source files.
Not verified
The full contents of the 75 changed files were not read. The visible portion of
diff.patchincludedAppendable.cppand the beginning ofByteSink.cpp, but neither file was reviewed in full.files.jsonreports no excluded files; no files underfiles/were opened. The author-reported test results in the PR description were not independently verified.To get this to a good state
Nothing is required. An optional full review would need to inspect the changed files and relevant source context before making a formal merge decision.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T11:29:00Z.
Review: COMMENTED
Built the submitted ICU sources against bundled ICU on Linux. The exact
TextandGuestIcuTextProvidersfixtures passed, covering the UChar and const-UnicodeString providers and their lifecycle. Most companion utility fixtures also passed. A standalone mixed-library run of the existing List fixture stopped on its null-status case, so my result covers the UText changes.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.