7.5 KiB
libSceIcu technical debt
Unknown function info
- 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_getVersionreturning78.1.0.0under an emulator, but neither escape function is in the checked nativesystem_ex/common_ex/lib/libSceIcu.sprxexport 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.
Functional
-
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_isJavaSpaceCharandu_isUWhiteSpacefollow 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 exportsu_isUWhiteSpacebut 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
strtouland 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 exceedingINT32_MAXand a capacity that overflows ICU's signeddestCapacity - ithrow. 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_versionFromUStringandu_versionToStringfollow 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 gueststrtoul, truncated to eight bits;u_versionToStringkeeps ICU's dropped zero tens digit (105 becomes15). A null buffer with a positive conversion length throws; ICU dereferences it. Closes when: compared with the console. -
Default-converter string copy helpers
u_austrcpyandu_austrncpyare unverified on a console and throwNotImplemented_nid_no_patchon code units above0x7f. 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_austrncpywrites a single NUL when the source ends before the count without zero-padding the remainder. Null buffers withu_austrcpyor a positive count throw an invalid-argument exception, whereas ICU dereferences inu_austrcpyand returns the destination unchanged inu_austrncpy. Closes when: compared with the console, including the default converter for non-ASCII units.
Known export names; ABI prototypes unverified
- The 96
sceIcuUnknown_*_nid_no_patchexports 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 throughNotImplemented_nid_no_patch; these declarations make no ABI or behavior claim.