feat(libSceIcu): give nine display name, plural and formatted value exports their ICU 68.2 signatures and early returns #23844
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/23844"
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 ToRaNek on 2026-11-19T19:05:20Z.
What
Nine exports of libSceIcu were parameterless
intplaceholders inRecoveredInventory.cppthat threw on every call. They now have their ICU 68.2 prototypes and the early returns of the ICU sources at commit84e1f26ea771, in the files that already hold their families, the way #17265 did it for 70 other recovered exports. None of the objects can exist yet (everyopenexport throws on a valid call), so every path that reads one still throwsNotImplemented_nid_no_patch.uldn_localeDisplayName,uldn_scriptDisplayName,uldn_regionDisplayNameU_ILLEGAL_ARGUMENT_ERRORcommon/locdspnm.cpp969-989, 1009-1025, 1036-1052uldn_keyValueDisplayNamecommon/locdspnm.cpp1090-1108uplrules_getKeywordsU_ILLEGAL_ARGUMENT_ERRORi18n/upluralrules.cpp159-180uplrules_selectWithFormatU_ILLEGAL_ARGUMENT_ERRORi18n/upluralrules.cpp138-157ureldatefmt_formatNumericU_ILLEGAL_ARGUMENT_ERROR, checked before the formatter is read (the same asureldatefmt_format)i18n/reldatefmt.cpp1301-1327udtitvfmt_resultAsValue,ulistfmt_resultAsValueU_ILLEGAL_ARGUMENT_ERROR. A non-null result has its magic number read next, so it throwsi18n/formattedval_impl.h266-270,IcuCApiHelper::validateincommon/capi_helper.h52-66Each file keeps its own way of reaching the guest
UErrorCode:LocaleDisplayNames.cpp,PluralRules.cppandRelativeDateTimeFormatter.cppgo throughGuestCopyIn_nid_no_patch/GuestCopyOut_nid_no_patch(the first one gains theWriteStatushelper its two neighbours already have),DateIntervalFormat.cppandListFormatter.cppuseIcu::Failureand a direct store like the exports around them. A nullUErrorCodethrows: the console dereferences it.Debt: five entries are added next to the existing ones of each family. The
recovered inventory exportsentry goes from 33 to 24 placeholders left, edited in the pendingfeat-libsceicu-field-position-iterator.mdfragment becausetools/debt_fold.py --checkrefuses two fragments that change the same entry.Stacked on #23839, itself on #23819. The three PRs change that same count line, so they cannot be independent. This branch is one commit,
81dc9c3045, on top of #23839'se045338414; until the two merge, the diff shows three commits and only the last belongs to this PR. The functions of the three PRs are different.Tested
Windows 11 IoT Enterprise LTSC 2024 (10.0.26100), WinLibs GCC 15.2.0 r7, Release,
BUILD_TESTING=ON, one045338414(#23839). Not run on a console; the console behaviour of these exports is unverified, as the debt entries say.guest_icu_recovered_signaturespasses.tests/LocaleDisplayNames.cpp,PluralRules.cpp,RelativeDateTimeFormatter.cpp,DateIntervalFormat.cppandListFormatter.cppgain one group each:static_asserts on the nine prototypes; seven failing status values (result returned, status unchanged, with null and non-null handles); four non-failing status values against each illegal argument (U_ILLEGAL_ARGUMENT_ERROR) and against valid calls (a throw, status unchanged); a null status; the output buffer and the fake object's bytes unchanged.mainthe placeholders areint(), so the new checks cannot compile against them (by construction, not built). Seven one-line mutations of the new code each fail the test, then it passes again with the code restored:uldnaccepting a null result with a positive size;uldn_keyValueDisplayNameaccepting a null value;uplrules_selectWithFormataccepting a null number format;uplrules_getKeywordsnot flagging null rules;ureldatefmt_formatNumericaccepting capacity -1;udtitvfmt_resultAsValueleaving the status for a null result;ulistfmt_resultAsValueignoring a failing status.ctest -R icu: 76 of 76 pass.python tools/check_conventions.py --base origin/mainandpython tools/debt_fold.py --checkpass.python tools/pr_overlap.py --namesover the nine names: each is a stub onmainand no open PR adds or edits it.--branchcould not compare six open PRs that conflict withmainon the recovered inventory files (#18210, #19635, #19645, #19670, #19720, #23196); compared by hand, none of them touches one of the nine exports.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 PrivacyOnion on 2026-11-19T19:20:08Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
81dc9c3045:tools/check_conventions.pypassed.guest_icu_recovered_signatures_testsbuilt cleanly.guest_icu_recovered_signatures):core/libs/prx/libSceIcu/Calendar.cpp,core/libs/prx/libSceIcu/DateFormat.cpp,core/libs/prx/libSceIcu/DateIntervalFormat.cpp,core/libs/prx/libSceIcu/ListFormatter.cpp,core/libs/prx/libSceIcu/LocaleDisplayNames.cpp,core/libs/prx/libSceIcu/PluralRules.cpp,core/libs/prx/libSceIcu/RecoveredInventory.cpp,core/libs/prx/libSceIcu/RecoveredInventory.hpp,core/libs/prx/libSceIcu/RecoveredSignatures.hpp,core/libs/prx/libSceIcu/RelativeDateTimeFormatter.cpp,core/libs/prx/libSceIcu/StringSearch.cppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me