feat(libSceLibcInternal): construct collate facets #22428
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/22428"
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 MarrasFederico on 2026-11-17T15:19:56Z.
What
Implement the four
std::collate<char>constructors inlibSceLibcInternal(_ZNSt7collateIcEC1Em/Oo1r8jKGZQ4,_ZNSt7collateIcEC1EPKcm/splBMMcF3yk,_ZNSt7collateIcEC1ERKSt8_Locinfom/raLgIUi3xmk,_ZNSt7collateIcEC2EPKcm/VClCrMDyydE) and remove their inventory stubs:"C"locale names through_Locinfovia RAIIScopedLocinfobefore modifying*this, rejecting nullthis, null_Locinfo, null/empty strings, and non-"C"names withstd::invalid_argument._ZTVSt7collateIcEon the0x20-byte facet, store the full 64-bitreferencesvalue (references+reserved), and zero the two collation pointers at offsets0x10and0x18, leaving non-C locales unsupported as inlibc's_Getcat.compare/hash/transform), lifetime/destruction, error-branch, and shared-library symbol dispatch coverage inGuestLibcInternalCollate.cpp.Tested
Coordinator verification at
c784eca370e53d345bc763382c718430e43d0b8a: Four focused tests passed, each repeated three times; the recorded constructor-vtable negative failed its expected compare assertion, with byte-exact restoration. Clean merge-tree against upstream/main5a23c6303baf68166689edbfcc78adf7160b05cd; conventions, public-header audit and diff checks passed. Fresh overlap scan covered 1720 open PRs; no functional duplicate found. Windows was not tested. The existing main wcstombs fragment collision remains outside this change.libSceLibcInternal,core/libs/libs/libSceLibcInternal.prx,guest_libc_internal_collate_tests,guest_collate_tests,guest_libc_internal_empty_facet_members_tests,guest_libc_internal_messages_tests) on Linux (Release,Ninja,BUILD_TESTING=ON).ctest --test-dir build --output-on-failure -R '^(guest_collate|guest_libc_internal_collate|guest_libc_internal_empty_facet_members|guest_libc_internal_messages)$'->4/4 Passed, and--repeat until-fail:3 -R '^guest_libc_internal_collate$'->3/3 Passed.Oo1r8jKGZQ4,splBMMcF3yk,raLgIUi3xmk,VClCrMDyydEexported inlibSceLibcInternal.prx(nm -D) and ran static checks (check_conventions.py --base upstream/main,test_public_headers.py --audit-only,git diff --check upstream/main...HEAD).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-17T15:22:05Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
c784eca370:tools/check_conventions.pypassed.guest_libc_internal_collate_testsbuilt cleanly.guest_libc_internal_collate):core/libs/prx/libSceLibcInternal/Collate.cpp,core/libs/prx/libSceLibcInternal/InventoryExports6.cpp,core/libs/prx/libSceLibcInternal/include/Api.hpp,core/libs/prx/libSceLibcInternal/include/InventoryExports6.hppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me