feat(libSceLibcInternal): construct and destroy _Locinfo and copy _Locimp as base objects #14660
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14660"
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 miguelcoxcaballero on 2026-11-01T16:57:57Z.
The three old stub C symbol names are retired intentionally. Each replacement keeps its original NID; the ABI audit's
export-removedwarnings refer to the old C symbols, not removed guest exports.What
Implements three
libSceLibcInternalexports that threwNotImplemented:pN02FS5SPgg(_ZNSt8_LocinfoC2EPKc)YXVCU6PdgZk(_ZNSt8_LocinfoD2Ev)dsJKehuajH4(_ZNSt6locale7_LocimpC2ERKS0_)They are the base-object (
C2/D2) constructor, destructor and copy constructor of classes without virtual bases. The Itanium C++ ABI only separates the complete-object and base-object variants by the virtual bases, so for these classes they do the same work. Each export runs the existinglibcexport of theC1/D1name (_ZNSt8_LocinfoC1EPKc,_ZNSt8_LocinfoD1Ev,_ZNSt6locale7_LocimpC1ERKS0_) and keeps its limits: only theClocale is accepted, and the copy shares the source facets. The three stubs, their declarations, two table rows and one stub entry are removed, and a debt entry records what is unverified: the console'slibSceLibcInternal.sprxwas not read and no title was seen calling them.Tested
Ubuntu 24.04, GCC, Release,
BUILD_TESTING=ON, full build:tools/check_conventions.py --base origin/mainpasses.guest_libc_internal_locale_objects: theC2constructor clears exactly the 64-byte_Locinfo,D2leaves it untouched, an unknown locale name and null objects throw; the_Locimpcopy gets the same vtable as thelibcC1copy, one reference, the source name, categories and transparency, and its own vector holding the source facets, with the source unchanged; null objects throw. It passes, together withguest_locale,guest_libc_internal_aligned_new,guest_libc_internal_mtx,guest_init_onceandguest_libc_threads.libSceLibcInternal.prxexports each of the three NIDs once.Not tested on Windows, macOS or a PS5, nor with any title.
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)libSceLibcInternalbase-object PRs; the four branches merge together cleanly and build)Imported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-11-01T19:48:48Z.
Review: COMMENTED
Withdrawn. This review applied a title-ID/log requirement that is not in CONTRIBUTING (
Unblocks: noneis allowed), and it contained no code review.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T21:21:07Z.
Review: COMMENTED
Reviewed — no blocking findings
Three inventory stubs become base-object exports for
_Locinfoand_Locimp. Each NID matches the base-object name it implements (C2,D2andLocimp C2) under the repo's NID tool, and the code calls the complete-objectC1/D1exports that libc defines. For classes without virtual bases, the Itanium ABI makes those the same work, as the debt entry says. The new guest test passed in the hosted Windows CTest run at this head (2595 of 2595 cases, includingguest_libc_internal_locale_objects). The ABI audit reports three removed stub names, each keeping its NID. Approval waits for the macOS relinker jobs, which were queued at review time.What I ran
a297ba4c37ca880d7f35ee790df5e17d541eb541; basef2d874c1fdccf781c0fa5d86619bb5dd8894b958. 8 files, +150/-21:LocaleObjects.cpp(new),CMakeLists.txt,InventoryExports.cpp(two stubs removed),InventoryExports6.cpp(one stub removed),include/Api.hpp,include/InventoryExports.hpp,tests/GuestLibcInternalLocaleObjects.cpp(new) anddocs/dev/debt/libSceLibcInternal.md.tools/nid_names.py:_ZNSt8_LocinfoC2EPKc=pN02FS5SPgg,_ZNSt8_LocinfoD2Ev=YXVCU6PdgZk,_ZNSt6locale7_LocimpC2ERKS0_=dsJKehuajH4. These are the NIDs of the three new exports, and of the three stubs they replace.LocaleSupport.cppdefines_ZNSt8_LocinfoC1EPKc(line 780),_ZNSt8_LocinfoD1Ev(line 785) and_ZNSt6locale7_LocimpC1ERKS0_(line 876). The new exports call those names.passed_with_warnings, 539 symbols; threeexport-removedfindings for the replaced stubs (libSceLibcInternalInventory_080,libSceLibcInternalInventory_141,sceLibcInternalUnknown6_048), each with its NID kept.guest_libc_internal_locale_objects(Test #2288).Results
pN02FS5SPgg,YXVCU6PdgZk,dsJKehuajH4match the C2, D2 and Locimp C2 namesLocaleSupport.cppguest_libc_internal_locale_objectspassed in the windows CTest runCommands and unedited precheck output
Commands:
python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14660 --output-dir <scratch>/precheck/14660p(report.md in that directory).git fetch https://github.com/boykopovar/AnyPS5.git pull/14660/head.python3 tools/pr_abi_audit.py --base f2d874c1fdccf781c0fa5d86619bb5dd8894b958 --head a297ba4c37ca880d7f35ee790df5e17d541eb541 --json.tools/nid_names.pycompute_nidon the six names above.gh api repos/boykopovar/AnyPS5/commits/a297ba4c37ca880d7f35ee790df5e17d541eb541/check-runs; Windows CTest:100% tests passed, 0 tests failed out of 2595.Precheck table (unedited):
The precheck deliberately does not configure, build, or compile AnyPS5.git diff --check f2d874c1fdccf781c0fa5d86619bb5dd8894b958...a297ba4c37ca880d7f35ee790df5e17d541eb541/marc/DeusMachina_0x1914/.venv/bin/python3 tools/check_conventions.py --base f2d874c1fdccf781c0fa5d86619bb5dd8894b958 --head a297ba4c37ca880d7f35ee790df5e17d541eb541 --title feat(libSceLibcInternal): construct and destroy _Locinfo and copy _Locimp as base objects --body /dev/shm/reviewer-run/precheck/14660p/pr-body.md/marc/DeusMachina_0x1914/.venv/bin/python3 tools/pr_abi_audit.py --base f2d874c1fdccf781c0fa5d86619bb5dd8894b958 --head a297ba4c37ca880d7f35ee790df5e17d541eb541 --jsonNo changed Python implementation files.No changed tools/ module has an existing sibling tools/tests/test_<module>.py suite.No changed test_*.py files./marc/DeusMachina_0x1914/.venv/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 14660 --repo boykopovar/AnyPS5 --output-dir /dev/shm/reviewer-run/precheck/14660p/stackNot run: C++ tests need exact-head binaries, which require a build; the precheck does not build./marc/DeusMachina_0x1914/.venv/bin/python3 /dev/shm/reviewer-run/precheck/14660p/head-a297ba4c37ca-1f5c1206/tools/pr_test_quality.py --root /dev/shm/reviewer-run/precheck/14660p/head-a297ba4c37ca-1f5c1206 --json core/libs/prx/libSceLibcInternal/CMakeLists.txt core/libs/prx/libSceLibcInternal/InventoryExports.cpp core/libs/prx/libSceLibcInternal/InventoryExports6.cpp core/libs/prx/libSceLibcInternal/LocaleObjects.cpp core/libs/prx/libSceLibcInternal/include/Api.hpp core/libs/prx/libSceLibcInternal/include/InventoryExports.hpp core/libs/tests/GuestLibcInternalLocaleObjects.cpp docs/dev/debt/libSceLibcInternal.mdNo changed Python test module in tools/ can be run as a no-build base-source control.Negative control
Not run here. The test needs a build of the Linux host.
Findings
Blocking
None.
Non-blocking
libcexports of those names" is ambiguous: the NIDs are theC2,D2andLocimp C2names, while the code runs theC1,D1andLocimp C1exports. Please name both in the entry, as the other entries in this file do.export-removedwarnings are expected, since each NID is kept. Please say in the PR body that the stub names are retired on purpose.Sources
github.com/boykopovar/AnyPS5@a297ba4c37/core/libs/prx/libSceLibcInternal/LocaleObjects.cppgithub.com/boykopovar/AnyPS5@a297ba4c37/core/libs/tests/GuestLibcInternalLocaleObjects.cppgithub.com/boykopovar/AnyPS5@f2d874c1fd/core/libs/prx/libc/src/LocaleSupport.cpp (L780-L790)and #L876github.com/boykopovar/AnyPS5@a297ba4c37/docs/dev/debt/libSceLibcInternal.mdNot verified
libSceLibcInternalwas not read, as the debt entry says.To get this to a good state
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-02T05:10:38Z.
Review: COMMENTED
Reviewed — no blocking findings
This is a re-review at the current head. The head moved from
a297ba4c37only to name the libcC1andD1exports that the code calls in the debt entry, which was my earlier non-blocking point. The production code and the tests are unchanged. The hosted Windows CTest run passed at this head (2590 of 2590 cases, includingguest_libc_internal_locale_objects).What I ran
71b2057767cd497b5e1e516d5bc37b1dd4e6873c; basef2d874c1fdccf781c0fa5d86619bb5dd8894b958(unchanged). The diff against the earlier heada297ba4c37is one line indocs/dev/debt/libSceLibcInternal.md.LocaleObjects.cpp(three exports), the declarations, the CMake registration, the removed stubs and the test.pN02FS5SPgg,YXVCU6PdgZkanddsJKehuajH4match the C2, D2 and Locimp C2 names (checked earlier withtools/nid_names.py, unchanged).passed_with_warningswith the threeexport-removedfindings for the replaced stubs.guest_libc_internal_locale_objectsis Passed.Results
guest_libc_internal_locale_objects(hosted)export-removedfindings for the replaced stubsRead-only check output
Precheck was not run: no PR-head code is run here. ABI audit:
passed_with_warnings; findings are the threeexport-removedentries for the stubs replaced in this PR. Hosted:gh api repos/boykopovar/AnyPS5/commits/71b2057767cd497b5e1e516d5bc37b1dd4e6873c/check-runs.Negative control
Not run here. A negative control needs a build, and code from this head is not run here.
Findings
Blocking
None.
Non-blocking
export-removedwarnings are expected, since each NID is kept. The PR body should say the stub names are retired on purpose.Sources
github.com/boykopovar/AnyPS5@71b2057767/core/libs/prx/libSceLibcInternal/LocaleObjects.cppgithub.com/boykopovar/AnyPS5@71b2057767/docs/dev/debt/libSceLibcInternal.mdgithub.com/boykopovar/AnyPS5@71b2057767/core/libs/tests/GuestLibcInternalLocaleObjects.cppNot verified
libSceLibcInternalwas not read, as the debt entry says.To get this to a good state