feat(libSceIcu): implement the uprv allocation and string duplication helpers #17629
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/17629"
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 JoanNugroho on 2026-11-09T04:53:27Z.
Follows up #17231, which was closed automatically over the open PR limit and is reopened here from the same branch.
What
Implements
uprv_malloc,uprv_realloc,uprv_strdupanduprv_strndupin libSceIcu. They were parameterless throwing placeholders inLegacyExports.cpp.uprv_realloctreats that block as unallocated, and a resize of any other block to zero releases it and returns the shared block.u_setMemoryFunctionsare called with their context when set. Otherwise the blocks come from libc's guest heap, so a title releases them withfree; the module exports nouprv_free.uprv_strndupcopies exactlynbytes, past a NUL, and a negativenduplicates the whole string. A null source throws where ICU faults.Memory function configurationdebt entry no longer says that nothing calls the stored callbacks, and a new entry records what stays unverified.Tested
x86_64-ucrt-posix-sehr7, the CI toolchain):guest_icu_configurationpasses, and all 26icutests pass (ctest -R icu).Configuration.cppand the test compiled with libc'sApplicationHeap,ApplicationProcessParameters,GuestHeap,GuestArenaandGuestAllocationssources pass under UBSan and at-O2.core/libs/tests/test_public_headers.py --audit-onlyandtools/check_conventions.pypass.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)🤖 Generated with Claude Code
https://claude.ai/code/session_01QMWStysvjPgmgkKvPWyX1b
Pull request closed