feat(libSceLibcInternal): answer the codecvt and messages queries as firmware 13.42 does #15582
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15582"
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 BunnyFl on 2026-11-03T20:18:19Z.
What
Ten libSceLibcInternal exports for C++ locale facets threw. In firmware 13.42 each one returns a constant or nothing, reading none of its arguments, and this change does the same:
codecvt<wchar_t, char, mbstate_t>::do_always_noconv() constKheIhkaSrlAfalsecodecvt<wchar_t, char, mbstate_t>::do_max_length() const5BQIjX7Y5YU6codecvt<wchar_t, char, mbstate_t>::do_encoding() const4fPIrH+z+E40codecvt<char16_t, char, mbstate_t>::do_always_noconv() const9Vyfb-I-9xwfalsecodecvt<char16_t, char, mbstate_t>::do_encoding() constMo6K-pUyNhI0codecvt<char32_t, char, mbstate_t>::do_always_noconv() constNQ81EZ7CL6wfalsemessages<char>::do_open(const string&, const locale&) constHeBwePMtuFs-1messages<wchar_t>::do_open(const string&, const locale&) constzSehLdHI0FA-1messages<char>::do_close(catalog) constrRmMX83UL1Emessages<wchar_t>::do_close(catalog) constAjkxQBlsOOYNames and NIDs match
tools/nid_names.py. The return types are the standard ones for these members:boolfordo_always_noconv,intfordo_encoding,do_max_lengthanddo_open(messages_base::catalog),voidfordo_close.The exports keep their helper names in
core/libs/prx/libSceLibcInternal/Err.cppandExport.cpp, and now each has one declaration ininclude/Api.hpp, next to the other implemented_nid_no_patchhelpers there. The ten "prototype and behavior are unverified" entries indocs/dev/debt/libSceLibcInternal.mdare removed: their gaps are closed.Source
Firmware 13.42
system/common/lib/libSceLibcInternal.sprx(sha256a01795ab49df639dd40abd6194956ada062244826824ce486c9acab227bf5285), read from disassembly, not run on a console. Each body, to its return:No argument is read,
thisincluded, and nothing is written. A null or invalid pointer is never dereferenced, here or in firmware.Tested
maincdf371df68into the branch; the head is nowd0ac18c921. The only conflict was incore/libs/prx/libSceLibcInternal/CMakeLists.txt, wheremainregistered itsguest_libc_internal_memory_resourcetest next to this branch'sguest_libc_internal_facet_queries; both are kept. The branch's added and removed lines againstmainare the same as before the merge, so the negative control below was not repeated.d0ac18c921, Windows 11 Pro 10.0.26300, WinLibs GCC, Release: 68 of 68 pass, none Not Run, the same suite as below with every executable rebuilt.tools/check_conventions.py --base upstream/mainon the committed headd0ac18c921: all checks pass.9719108c9f(main9e432fbfa4merged in): 68 of 68 pass, none Not Run. That is the newguest_libc_internal_facet_queries,guest_err(same source files),guest_libc_internal_numpunct(added onmain, same library),public_headersand the 64public_headers_compile_*batches.core/libs/tests/GuestLibcInternalFacetQueries.cpp(registered afterguest_err_testsincore/libs/prx/libSceLibcInternal/CMakeLists.txt):40c1005030; the branch's added and removed lines againstmainare identical at that head and at9719108c9f): I putNotImplemented_nid_no_patch(__func__)back at the top of the ten bodies, which ismain's behaviour, and kept this branch's signatures and test. The new test then aborts withsceLibcInternalPending3_039_nid_no_patch not implemented(1 of 1 failed).tools/check_conventions.py --base upstream/mainon the committed head9719108c9f: all checks pass.tools/pr_overlap.py --branch feat/libcinternal-facet-queries --jobs 8at head9719108c9f, against 1,889 open pull requests: 21 share files with the branch. Five have conflicting lines next to this branch's additions,CMakeLists.txtL274 andinclude/Api.hppL155 onmain(#14903, #15852, #16356, and my #15584 and #15588); no row reports a shared export or new file. The run failed closed (exit 2) for the other 16, which it lists without comparing them line by line. I grepped the added and removed lines of all 21 diffs for the ten helper names, NIDs and mangled member names: none names any of them.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