feat(icu): implement ucnv_openStandardNames #23421
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/23421"
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 Thimo188 on 2026-11-19T01:34:20Z.
What
Implement
ucnv_openStandardNameswith guest-safe status and string access. Return an AnyPS5 callback-ABI proxy around ICU's enumeration so count, ordered iteration, reset, Unicode iteration, and close remain compatible on Linux and Windows. Preserve ICU's prefailed-status and missing-alias-data behavior.Tested
Docker
linux/amd64,anyps5-dev:24.04:cmake --build build --target guest_icu_open_standard_names_tests -j2ctest --test-dir build -R guest_icu_open_standard_names --output-on-failurepython3 tools/check_conventions.py --base origin/mainpython3 tools/pr_overlap.py --branch feat/icu-ucnv-open-standard-namesChecklist
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 PrivacyOnion on 2026-11-19T01:36:46Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
dd7f28df1b:tools/check_conventions.pypassed.guest_icu_open_standard_names_tests,libSceIcubuilt cleanly.guest_icu_open_standard_names_reduced,guest_icu_open_standard_names_full):core/libs/prx/libSceIcu/LegacyExports.cpp,core/libs/prx/libSceIcu/include/LegacyExports.hppreverted 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-19T01:41:59Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge:
writeStatuscan fail after the host enumeration is opened, throwing without closing it.What I ran
dd7f28df1b170d8cf01143d4be3bfe35ea0d0c9dusing the pinnedrepo_read.pyreader.Results
Findings
Blocking
core/libs/prx/libSceIcu/LegacyExports.cpp:7176: If the caller's status pointer is read-only and ICU changes the status after opening the host enumeration,writeStatus(status)throws but leaveshostopen. Closehoston this exception path before propagating the error (or otherwise ensure ownership is released whenever status publication fails).Non-blocking
None.
Not verified
core/libs/prx/libSceIcu/CMakeLists.txt,core/libs/prx/libSceIcu/LegacyExports.cpp,core/libs/prx/libSceIcu/include/LegacyExports.hpp,core/libs/prx/libSceIcu/tests/OpenStandardNames.cpp, andcore/libs/prx/libSceIcu/tests/OpenStandardNamesSetup.cpp.To get this to a good state
guest_icu_open_standard_namestests.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T07:34:36Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this change based on the code inspected; the pull request’s reported checks were not run in this review.
What I ran
fe137dc0a48b6f3acba3a653e5c62c65300dfe1ausing the prepared diff andrepo_read.py.CMakeLists.txt,LegacyExports.cpp,include/LegacyExports.hpp,tests/OpenStandardNames.cpp, andtests/OpenStandardNamesSetup.cpp. Also readEnumeration.hpp,Enumeration.cpp, and theGuestCopyInimplementation for context.review/files.jsonwas unavailable; the review folder’s README and manifest listed the changed files, all of which were read.Results
Findings
Blocking
None.
Non-blocking
core/libs/prx/libSceIcu/LegacyExports.cpp:7174fails.Not verified
To get this to a good state
Nothing is required. The resource cleanup point above is optional.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T08:19:09Z.
Review: CHANGES_REQUESTED
Reviewed — comments
Changes are required before merge: address the status and ownership correctness issues described below.
What I ran
Reviewed head
d75b0028ecdda94b41a7ae0b3e9132d02ac65786; base ismain. I read the prepared description, commits, manifest, full diff, and all five changed files at the pinned head, plusEnumeration.hppand theGuestCopyInimplementation. No commands or tests were run; the test results in the PR description are author-reported.Results
Findings
Blocking
ucnv_openStandardNames_nid_postfixignores ICU warnings when deciding whether to write the status:writeStatuscomparesoutgoingto the originalincomingvalue (core/libs/prx/libSceIcu/LegacyExports.cpp:7103). For an input warning status, ICU'sU_SUCCESSsemantics permit the operation, but if it leaves the same warning value, the status write is skipped; more seriously, an enumeration is returned even when the output status is a different warning, and a read-only status pointer then throws after the ICU object has been created. Ensure status write behavior follows the guest contract and clean up the proxy on every exception after allocation. The existing forced-warning test exercises cleanup only for a forced warning plus read-only status.core/libs/prx/libSceIcu/LegacyExports.cpp:7126). This can return ICU's data-access failure for null arguments, whereas the normal ICU API's illegal-argument handling should take precedence. Validate null arguments before invoking that fallback, while preserving the intended reduced-data status precedence if required by the target behavior.Non-blocking
None.
Not verified
No build or test command was run, so the author's reported Linux results were not independently confirmed. Windows execution and physical-console behavior were not verified. The prepared bundle listed five changed files; all five were read. No excluded changed files were listed in the manifest excerpt.
To get this to a good state
Fix the status handling and ensure allocated ICU/proxy resources are released on all exceptional exits; clarify and implement null-argument versus missing-data error ordering. Then run the added reduced and full test cases on the revised head.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T08:36:17Z.
Review: APPROVED
Reviewed — looks good
The implementation and its focused tests support the stated ICU enumeration behavior; I found no verified blocking defects.
What I ran
Reviewed head
b2cc474a50bedaa4586436b87fdfe4a2ae0739e1against the prepared diff. No commands or tests were run during this review.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
Build and test claims in the PR description were not independently verified. The full context of
LegacyExports.cppbeyond the changed hunk was not read. Files read:description.md,commits.md,manifest.json,diff.patch, and changed lines forCMakeLists.txt,LegacyExports.cpp,include/LegacyExports.hpp,tests/OpenStandardNames.cpp, andtests/OpenStandardNamesSetup.cpp. Excluded changed files: none.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T08:59:58Z.
Review: COMMENTED
Reviewed — no blocking findings
The inspected implementation and test additions show no verified blocking defect; execution checks were not available in this review session.
What I ran
Reviewed head
d443e4fd1a0d0b0cfc159533313b94379232956fusing the prepared diff and pinned repository reader. No build or test commands were run.Results
Negative control
Not run; no test execution was available.
Findings
Blocking
None verified in the inspected changes.
Non-blocking
None.
Sources
Not verified
Build and test results reported in the PR description were not independently confirmed.
LegacyExports.cppwas read around its changed hunks, not in full. The five changed files listed by the review-folder listing wereCMakeLists.txt,LegacyExports.cpp,include/LegacyExports.hpp,tests/OpenStandardNames.cpp, andtests/OpenStandardNamesSetup.cpp; each was read at least in part. The supplied review bundle did not exposefiles.json.To get this to a good state
Nothing is required. Optional: run the reported build, CTest, conventions, and overlap checks on the reviewed head before merge.