Files
AnyPS5/docs/dev/debt/libSceIcu.md
T

34 KiB
Raw Blame History

libSceIcu technical debt

Additional callable exports

  • Additional callable exports - 72 functions match typed NIDs in the public 3.20 catalogue and both version-labelled images; neither image label authenticates retail firmware provenance. Prototypes and behavior are unverified. Each declaration throws through NotImplemented_nid_no_patch; no runtime functionality is implemented.

  • Per-image ELF records describe the module, library, raw names, type, values and sizes for the declarations in Export.cpp. The metadata SHA-256 is 551b2d4f646b934cb7eae6a2f2f3bf58e4fb2ba53644d2d1af40f133fda15eb9; image provenance and labels are not authenticated.

Name NID
u_tolower I7A4lT+s9h8
u_totitle f4x1+G7t6eY
u_toupper rpv+luk5Ye0
ublock_getCode Oi8niAD8r1M
ubrk_close -Hc6XkAq-eU
ubrk_countAvailable bZT8JIrrg3I
ubrk_current fsgqunLD2b8
ubrk_first cL3dlqTcRqk
ubrk_following dC+0Pz5afr0
ubrk_getAvailable +Nd4bYkEgRc
ubrk_getRuleStatus av8J5NBkbRE
ubrk_isBoundary ypOz3lP3VhE
ubrk_last n6SEUE4Txvg
ubrk_next 4Uj1DZGlHTw
ubrk_open NfGO57hqUEw
ubrk_preceding 9hkT1aMC0Rs
ubrk_previous tGeOQLpMGgA
ubrk_setText NtjY-lZG4ss
ubrk_setUText qQMUbG5L6oE
ucnv_cbFromUWriteBytes qjWeIkH81-Y
ucnv_close JTIHqYZFMQE
ucnv_convertEx lPKKDtEmEgM
ucnv_fromUnicode 6ZIjQAWKeRs
ucnv_getCanonicalName 0GnpUt-BVlE
ucnv_getName 7pCOClUrUmM
ucnv_open AKenFQbXGE0
ucnv_reset 5O8bmW45o0U
ucnv_setFallback iEe61PaW1pg
ucnv_setFromUCallBack E0yB1UHl4VI
ucnv_setSubstChars Ku0Rs703XaI
ucnv_setToUCallBack UIU5m-5O68c
ucnv_toUChars LvSzmTZ0Mss
ucnv_toUnicode O1eMKYxVlTs
ucurr_getName T7jc4xaLMKo
ucurr_openISOCurrencies BFt6nFM3lbc
udata_setCommonData wHZwCpZVcGI
udata_setFileAccess mCyTdtewGpk
uloc_addLikelySubtags HQ6DCQrAXD4
uloc_canonicalize G-Jl6md9fz4
uloc_countAvailable J5lZTL2H6Aw
uloc_forLanguageTag a+8yAm1ZfCE
uloc_getAvailable JnzWSfYU-xg
uloc_getBaseName CZ0z95gBgXg
uloc_getCharacterOrientation pMLs993oHk0
uloc_getCountry SIZrguvplN4
uloc_getDefault m1nD9D9LmP0
uloc_getKeywordValue QYSES3tXUHM
uloc_getLanguage dxyWDe5AwgY
uloc_getScript 9lLmMrDj590
uloc_minimizeSubtags yb9tILRzD1k
uloc_setKeywordValue sw98L1MbqpM
uloc_toLanguageTag zmMWRKwedmw
uloc_toUnicodeLocaleType tRTGVdmiGzQ
unorm2_composePair e+Udsq-3S+I
unorm2_getNFCInstance ikNH4c6kdMw
unorm2_getNFDInstance Drupl3SzOhM
unorm2_getNFKCInstance u7NoGsVfzcU
unorm2_getNFKDInstance nyO3x1IgiSI
unorm2_getRawDecomposition B8jGs8D+GHY
unorm2_isNormalized 7ETpt3V2fEU
unorm2_normalize eMM8e4yA3AU
ures_close --GQ9Ov+0mM
ures_getByKey 8WDJjbxNvCg
ures_getStringByKey apt8-c9wFxQ
ures_open bpD6xUk4QVI
uscript_getScript fiX2RRLQhak
uscript_getShortName 4cTIrOZw1-0
uscript_hasScript PWK6yVIGNuY
utext_close 2NaZ-stsAv0
utext_openConstUnicodeString yc1XEzBopCw
utext_openUChars o9+yMOok2Zs
utext_setup sEKpfqARKPI

Unknown function info

  • The 134 recovered inventory exports have unverified parameters, return types, callback ABIs and behavior. Every entry immediately throws through NotImplemented_nid_no_patch; the parameterless int declarations are import-resolution placeholders. The 13.60 inventory establishes only name/NID bindings. The module map assigns all 134 NIDs to logical libSceIcu in libSceIcu.sprx. Recovered ucfpos, uset and uiter groups are excluded. Console ABI, behavior and title compatibility remain unverified.

  • ICU export availability across firmware versions remains unproven. The PS5 3.20 inventory includes the implemented escape, invariant-character and version helpers. BunnyFl’s firmware 13.42 report records u_getVersion returning 78.1.0.0 under an emulator, but neither escape function is in the checked native system_ex/common_ex/lib/libSceIcu.sprx export table. Only 104 of the 661 inventory NIDs appear among that module’s 299 exports. The exports for compatibility with older firmware are retained; availability and routing across firmware versions remain unproven.

Break iterator factories

  • Break iterator factories - Four 3.20 callable NIDs are the ICU 68 BreakIterator::createCharacterInstance, createWordInstance, createLineInstance and createSentenceInstance(const Locale&, UErrorCode&): their icu_68 mangled names hash to these NIDs, and the selector each wrapper passes is the UBreakIteratorType that ICU 68 passes to BreakIterator::createInstance. They are declared as throwing placeholders; their prototypes are not verified and break iteration needs ICU rule data that no host library provides. The four selector wrappers have identical instruction bytes in the 3.20 and later version-labelled modules, and corresponding consumer switch cases call them. Their NIDs and internal layouts differ, and the later NIDs match no icu_60 to icu_79 name of these functions; no forwarding or binary compatibility is claimed. Later image version metadata does not authenticate a retail firmware release.
3.20 NID Later candidate NID Selector ICU 68 function
BufsAiaX0+s 3lVihhFbXus 0 createCharacterInstance
xdF5zg0V5Oc HFkUTLyJkZ0 1 createWordInstance
Con4H1SB3nw jXOj7dZh7RQ 2 createLineInstance
lME28PLmu54 bxjI++g9NkE 3 createSentenceInstance

Functional

  • Older callable exports - 1691 of the 2347 3.20 callable NIDs are declared under ICU 68 names: each NID is the tools/nid_names.py hash of a dynamic symbol of libicuuc, libicui18n or libicuio in the ICU 68.2 Ubuntu 20.04 build, with the _68 renaming suffix removed from C names; 1293 of them are C++ names in the icu_68 namespace. A name match does not show that the console function has ICU 68's prototype or behavior, and none is implemented; each throws through NotImplemented_nid_no_patch. The other 656 keep placeholder names; 652 of them match no ICU 68.2 symbol. These NIDs do not appear in the later version-labelled module inventory; no cross-version identity or compatibility is claimed.

  • UTF-8 macro helpers have no console ABI or behavior verification. Their names and NIDs are in the PS5 3.20 inventory; behavior follows ICU 78.1 utf_impl.cpp. These are macro bodies, not complete UTF-8 operations: append encodes ASCII with two bytes, and null-error-pointer failures write the legacy length-dependent error characters. Null index pointers, negative positions, reversed bounds, overflowing index or capacity arithmetic, and null buffers when accessed throw instead of reproducing undefined behavior. Negative forward lengths denote NUL-terminated input. Cross-firmware export availability and native behavior outside the macros' preconditions remain unverified.

  • Space classification is unverified on a console. u_isspace, u_isblank, u_isWhitespace, u_isJavaSpaceChar and u_isUWhiteSpace follow ICU 78.1 uchar.cpp over fixed Zs, Zl, Zp and White_Space sets instead of ICU's property data; the sets are unchanged from ICU 65.1 to 78.1. Firmware 13.42 exports u_isUWhiteSpace but not the other four (#11013), which are kept from the 3.20 inventory for older firmware (see ICU export availability). Closes when: compared with the console.

  • C string helpers have no console ABI or behavior verification. Their names/NIDs are in the PS5 3.20 inventory; signatures and behavior follow ICU 78.1's cstring.cpp, unchanged since 65.1 apart from casts. Formatting accepts radices 2–16; null buffers or other radices throw an invalid-argument exception, whereas ICU dereferences the buffer and only asserts the radix. Signed minima and outputs exceeding ICU's 30-byte temporary use unsigned arithmetic and caller storage without reproducing upstream undefined behavior. Parsing uses guest LP64 strtoul and keeps the low 32 bits; a null source throws. Cross-firmware availability, native invalid-input behavior and the undefined upstream cases remain unverified.

  • Converter STOP/SKIP callbacks have no console ABI or behavior verification. Signatures and decisions follow ICU 78.1's ucnv_err.h and ucnv_err.cpp. The callback-specific default-ignorable ranges include U+180F, which ICU 65.1 excludes; firmware-dependent selection is not implemented. Reasons outside the upstream enum's 0–7 value range and a null error pointer on a path that writes it throw invalid_argument; native behavior there is undefined. Untouched pointers remain unread, including the error pointer on no-write paths. Converter argument structures stay opaque because these callbacks do not access them; converter execution and other callbacks remain unavailable.

  • Escape decoding has no behavior or ABI verification on console hardware. It follows ICU 78.1's ustring.cpp, including rejection of eight-digit braced hexadecimal escapes although its public header advertises up to eight digits. Null source or offset pointers and null callbacks with an in-range offset, which ICU dereferences, throw std::invalid_argument. A negative capacity writes nothing, as in ICU; source lengths exceeding INT32_MAX and a capacity that overflows ICU's signed destCapacity - i throw. Null-destination preflight ignores capacity. Closes when: compared with the console, including callback ABI, byte conversion, capacity limits and braced hexadecimal parsing.

  • Invariant character and version helpers are unverified on a console. u_charsToUChars, u_UCharsToChars, u_versionFromString, u_versionFromUString and u_versionToString follow ICU 78.1 uinvchar.cpp and putil.cpp, unchanged since 65.1. Firmware 13.42 reports ICU 78.1 and exports none of them (#11013); the 3.20 table has all five. Version parts use the guest strtoul, truncated to eight bits; u_versionToString keeps ICU's dropped zero tens digit (105 becomes 15). A null buffer with a positive conversion length throws; ICU dereferences it. Closes when: compared with the console.

  • Iterator comparison and Unicode version are unverified on a console. u_strCompareIter and u_getUnicodeVersion follow ICU 78.1 ustring.cpp and uchar.cpp; the version is 17.0, the Unicode data of 78.1, whatever firmware is emulated. A null iterator callback that ICU would call throws std::invalid_argument; ICU dereferences it. The code unit difference wraps instead of overflowing. The UBool is read as one byte, nonzero meaning true. Closes when: compared with the console.

  • Default-converter string copy helpers u_austrcpy and u_austrncpy are unverified on a console and throw NotImplemented_nid_no_patch on code units above 0x7f. Their names and NIDs come from the PS5 3.20 inventory; signatures and ASCII (0x01–0x7f) behavior follow ICU 78.1's ustr_cnv.cpp, unchanged since 65.1, without assuming the console's default converter for non-ASCII units. u_austrncpy writes a single NUL when the source ends before the count without zero-padding the remainder. Null buffers with u_austrcpy or a positive count throw an invalid-argument exception, whereas ICU dereferences in u_austrcpy and returns the destination unchanged in u_austrncpy. Closes when: compared with the console, including the default converter for non-ASCII units.

  • UTF-16 lexical comparisons: equivalence on console hardware remains unverified. The five exports follow ICU 78.1 ustring.cpp and its public UTF-16 ABI. Required null buffers throw where upstream dereferences them; nonpositive u_strncmp/u_memcmp counts and a zero code-point comparison count or identical code-point buffers read nothing. Negative u_memcmpCodePointOrder counts select NUL-terminated lengths, preserving the first differing code-unit result. Strings whose length cannot fit int32 throw instead of narrowing the length.

  • Firmware availability: BunnyFl’s firmware 13.42 report records u_getVersion returning 78.1.0.0 with system_ex/common_ex/lib/libSceIcu.sprx run under an emulator. None of these five lexical APIs is in that native module’s 299 exports. The 3.20 compatibility exports are retained; availability and routing across firmware versions remain unproven.

  • UTF-16 set searches and tokenization have no console verification; ICU versions on other firmware are unverified. Signatures and behavior follow ICU 78.1's ustring.h and ustring.cpp. u_strtok_r preserves that source's one-code-unit delimiter overwrite, including the trailing surrogate left after splitting at a supplementary delimiter. Invalid null inputs and rejected guest-write scopes throw; an initial continuation assignment is retained if a later delimiter write is rejected. Set-search offsets beyond INT32_MAX throw.

  • Numeric platform helpers are unverified on a console. The 24 uprv_ IEEE 754, rounding, extreme, overflow and pointer-limit exports follow ICU 78.1 putil.cpp and umath.cpp, unchanged since 65.1, assuming the default IEEE_754 and U_MAX_PTR configuration. The 3.20 table has them; firmware 13.42 exports none (#11013). The libm wrappers call the guest libc, so their precision is libc's. ICU's quirks are kept: uprv_trunc of negative infinity is positive infinity, NaN results are the canonical quiet NaN, uprv_fmax(0.0, -0.0) is -0.0, and uprv_round floors x + 0.5. Null uprv_modf and overflow result pointers throw; ICU dereferences them. Closes when: compared with the console.

  • u_getVersion and u_errorName follow ICU 78.1, the version firmware 13.42's module reports and exports both for (#11013); only u_getVersion's 78.1.0.0 was measured there. u_errorName returns the names in 78.1's utypes.cpp, including its U_BRK_VARIABLE_REDFINITION spelling, and [BOGUS UErrorCode] for every other code; the names were not compared with the console. Both report 78.1 whatever firmware is emulated, although the 3.20 module was ICU 65 to 68 and has no names for the codes added since. Closes when: compared with the console.

  • Constrained field positions are unverified on a console. The seven ucfpos_ exports firmware 13.42 has (#11013) follow ICU 78.1 formattedvalue.cpp and capi_helper.h. A handle is a host object whose first four bytes hold ICU's magic 0x55434600; the rest of its layout differs from ICU's. A set error changes nothing, a null handle sets U_ILLEGAL_ARGUMENT_ERROR and other memory U_INVALID_FORMAT_ERROR; ucfpos_open ignores the error unless allocation fails. No export fills a position yet, so the indexes stay 0. Null error pointers and index outputs throw where ICU dereferences them. Closes when: compared with the console.

  • Code point sets are unverified on a console. uset_openEmpty, uset_close, uset_add, uset_addRange, uset_addAll, uset_contains, uset_getItemCount and uset_getItem, which firmware 13.42 exports (#11013), follow ICU 78.1 uset.cpp and uniset.cpp: code points are pinned to 0..10FFFF before adding, ranges merge, and uset_getItem checks a negative index before the set. Sets hold no strings, because no export here adds one (uset_openPattern is not implemented). Allocation failure throws instead of making the set bogus. Null or foreign sets, outputs and error pointers throw where ICU dereferences them. Closes when: compared with the console.

  • Enumeration dispatch is unverified on a console. uenum_close, uenum_count, uenum_next and uenum_unext, which firmware 13.42 exports (#11013), follow ICU 78.1 uenum.cpp over the 56-byte UEnumeration of uenumimp.h, calling its callbacks with the guest ABI. uprv_free is the guest free, as ICU's default allocator is free and 13.42 exports no u_setMemoryFunctions. No export here creates an enumeration yet. A null status with a nonnull enumeration throws where ICU dereferences it. Closes when: compared with the console.

  • Character iterators are unverified on a console. uiter_setString and uiter_setUTF8, which firmware 13.42 exports (#11013), fill the 112-byte UCharIterator with guest-ABI callbacks ported from ICU 78.1 uiter.cpp, including its lazy UTF-8 index, split supplementary characters, packed UTF-8 state, wrapping index arithmetic and its forward-move quirk that overwrites a just-known index. Ill-formed UTF-8 decodes to U+FFFD per maximal subpart as U8_NEXT_OR_FFFD and U8_PREV_OR_FFFD do. Callbacks given a null iterator, and the no-op setState given a null error pointer, throw where ICU dereferences them. Closes when: compared with the console.

  • UTF-32 to UTF-16 conversion is unverified on a console. u_strFromUTF32 and u_strFromUTF32WithSub follow ICU 78.1 ustrtrns.cpp, including the preflight length, a supplementary code point that does not fit being counted while later BMP code points still are written, and the U_ILLEGAL_ARGUMENT_ERROR, U_INVALID_CHAR_FOUND, U_BUFFER_OVERFLOW_ERROR and U_STRING_NOT_TERMINATED_WARNING codes. A null UErrorCode and a result longer than INT32_MAX throw where ICU dereferences or overflows. The NIDs come from the 3.20 inventory and their presence on current firmware is unproven (see ICU export availability). Closes when: compared with the console.

  • UTF-16 string comparison is unverified on a console. u_strCompare follows ICU 78.1 ustring.cpp: a difference of units for NUL-terminated strings, -1, 0 or 1 for equal prefixes of counted strings, a 0x2800 adjustment in code point order, and 0 for null pointers or lengths below -1. The UBool argument is read as one signed byte. The NID comes from the 3.20 inventory and its presence on current firmware is unproven (see ICU export availability). u_strCompareIter is not implemented: it needs the UCharIterator layout. Closes when: compared with the console.

  • UTF-16 substring search is unverified on a console. u_strstr and u_strrstr follow ICU 78.1 ustring.cpp (u_strFindFirst and u_strFindLast with both strings NUL-terminated), including the rejection of matches that split a surrogate pair, a null substring returning the string and a null string returning null. The NIDs come from the 3.20 inventory and their presence on current firmware is unproven (see ICU export availability). Closes when: compared with the console.

  • Character classification and digit helpers are unverified on a console. u_isISOControl and u_forDigit follow ICU 78.1 uchar.cpp: the C0 and C1 control ranges need no Unicode property data, and u_forDigit returns 0 for a radix outside 2..36 or a digit outside the radix. UBool is returned and int8_t radix is read as one signed byte. The NIDs come from the 3.20 inventory and their presence on current firmware is unproven (see ICU export availability). Closes when: compared with the console.

  • ISO comment lookup is unverified on a console. u_getISOComment follows ICU 78.1 unames.cpp, where the function only validates its arguments and returns the empty string because the Unicode ISO_Comment property is deprecated and has no values (uchar.h, deprecated since ICU 49). The console's u_getISOComment is not compared; a null status returns 0 as in ICU. The NID comes from the 3.20 inventory and its presence on current firmware is unproven (see ICU export availability). Closes when: compared with the console.

  • Data directory is unverified on a console. u_setDataDirectory and u_getDataDirectory follow ICU 78.1 putil.cpp: a locked copy of the path, empty for null or empty input. The default is the empty string; the ICU_DATA variable and build-time defaults that ICU consults are not read, and the console's default directory is unmeasured. Nothing in this module loads ICU data from it. The NIDs come from the 3.20 inventory and their presence on current firmware is unproven (see ICU export availability). Closes when: compared with the console.

  • Cleanup is unverified on a console. u_cleanup follows ICU 78.1 ucln_cmn.cpp for the state this module keeps: it clears the functions stored by u_setMemoryFunctions and resets the data and time zone files directories. Pointers returned earlier by the directory getters are invalidated, as in ICU. ICU's tracing and per-library cleanup chains have no counterpart here. The NID comes from the 3.20 inventory and its presence on current firmware is unproven (see ICU export availability). Closes when: compared with the console.

  • Time zone files directory is unverified on a console. u_setTimeZoneFilesDirectory and u_getTimeZoneFilesDirectory follow ICU 78.1 putil.cpp: a locked copy that a null path clears with U_ILLEGAL_ARGUMENT_ERROR, and the empty string for a failure status. The default is empty; ICU_TIMEZONE_FILES_DIR and the build-time default are not read, and nothing in this module reads time zone files. A null UErrorCode throws where ICU dereferences it. The NIDs come from the 3.20 inventory and their presence on current firmware is unproven (see ICU export availability). Closes when: compared with the console.

  • Locking configuration is unverified on a console. u_setMutexFunctions and u_setAtomicIncDecFunctions follow the deprecated ICU 78.1 umutex.cpp: they ignore their callbacks and set U_UNSUPPORTED_ERROR unless the status already is a failure. The callbacks are declared as untyped pointers because they are never called. A null UErrorCode throws where ICU dereferences it. The NIDs come from the 3.20 inventory and their presence on current firmware is unproven (see ICU export availability). Closes when: compared with the console.

  • Memory function configuration is unverified on a console. u_setMemoryFunctions follows ICU 78.1 cmemory.cpp: it stores the context and callbacks under a lock and rejects a null callback with U_ILLEGAL_ARGUMENT_ERROR, but no export in this module allocates through them, so the stored callbacks are never called and their guest calling convention is unverified. Firmware 13.42 is reported to export no u_setMemoryFunctions (#11132); the NID comes from the 3.20 inventory (see ICU export availability). Closes when: compared with the console.

  • Java modified UTF-8 to UTF-16 conversion is unverified on a console. u_strFromJavaModifiedUTF8WithSub follows ICU 78.1 ustrtrns.cpp and utf_impl.cpp, including the bytes a malformed sequence swallows and the preflight count of one unit per substituted sequence after the destination fills, even for a supplementary substitution character. A null UErrorCode and a result longer than INT32_MAX throw. The NID comes from the 3.20 inventory and its presence on current firmware is unproven (see ICU export availability). Closes when: compared with the console.

  • UTF-16 to Java modified UTF-8 conversion is unverified on a console. u_strToJavaModifiedUTF8 follows ICU 78.1 ustrtrns.cpp: each code unit is encoded alone (surrogates take three bytes, U+0000 takes two), output stops at the first unit that does not fit, and the result codes follow u_terminateChars. A null UErrorCode and a result longer than INT32_MAX throw. The NID comes from the 3.20 inventory and its presence on current firmware is unproven (see ICU export availability). Closes when: compared with the console.

  • UTF-16 to UTF-32 conversion is unverified on a console. u_strToUTF32 and u_strToUTF32WithSub follow ICU 78.1 ustrtrns.cpp: only a lead surrogate followed by a trail surrogate is combined, every other surrogate is replaced or fails with U_INVALID_CHAR_FOUND, and the result codes follow u_terminateUChar32s. A null UErrorCode and a result longer than INT32_MAX throw. The NIDs come from the 3.20 inventory and their presence on current firmware is unproven (see ICU export availability). Closes when: compared with the console.

Known export names; ABI prototypes unverified

  • Unicode decimal digit helpers u_charDigitValue and u_digit are unverified on a console. The 72 decimal ranges cover the 770 decimal code points in ICU 78.1's Unicode 17.0 data, and u_digit follows the pinned ICU u_digit implementation, including ASCII and fullwidth Latin letters for radices 2–36. Console ABI, firmware data version, behavior and title compatibility remain unverified.

  • The 74 sceIcuUnknown_*_nid_no_patch and named *_nid_postfix stubs in Export.cpp are present in the PS5 3.20 export inventory from PS5-3.20_Libs. Their prototypes and behavior are unverified. Each uses the no-parameter import-resolution convention and throws through NotImplemented_nid_no_patch; these declarations make no ABI or behavior claim.

  • The 72 named stubs declared in Identified.hpp carry the ICU C API names whose tools/nid_names.py hash equals the inventory NID; the names were taken from the identifiers of the ICU 78.1 common, i18n and io sources. A name match does not show that the console function has ICU's prototype or behavior. Most of them read Unicode property, case-folding or resource data that no host library provides.

  • Resource type classification has no console ABI or behavior verification. res_getPublicType (NID WPrktCwd+iw in the PS5 3.20 inventory above) takes an unsigned 32-bit resource and returns a signed 32-bit public type, following ICU 65.1 and ICU 78.1. Both use the same mapping of the high four bits; the low 28 bits do not affect the result. Cross-firmware export availability and native behavior remain unverified. Closes when: compared with the console.

  • Locale keyword search has no console ABI or behavior verification. locale_getKeywordsStart (NID wlK146pHnQ4 in the PS5 3.20 inventory above) takes a const char* and returns the first @ or null, following ICU 68.2: the 3.20 inventory NID BufsAiaX0+s is the hash of the icu_68 BreakIterator::createCharacterInstance symbol. ICU 77 and later take a std::string_view, so a module built from those would accept a string that is not terminated; which ICU version later firmware uses is unverified. ICU dereferences a null locale, which throws here. Closes when: compared with the console.