feat(libSceLibcInternal): implement the numpunct<char> members #14373
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14373"
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 uttam12331 on 2026-11-01T10:45:41Z.
What
Implements ten
libSceLibcInternalexports ofstd::numpunct<char>that threwNotImplemented:_ZNKSt8numpunctIcE13decimal_pointEvklWxQ2nKAHY_ZNKSt8numpunctIcE13thousands_sepEvQGSIlqfIU2c_ZNKSt8numpunctIcE8groupingEvJWplGh2O0Rs_ZNKSt8numpunctIcE9falsenameEv3+VwUA8-QPI_ZNKSt8numpunctIcE8truenameEvfXUuZEw7C24_ZNKSt8numpunctIcE16do_decimal_pointEvJXzQGOtumdM_ZNKSt8numpunctIcE16do_thousands_sepEvzv1EMhI7R1c_ZNKSt8numpunctIcE11do_groupingEvcnNz2ftNwEU_ZNKSt8numpunctIcE12do_falsenameEvozLi0i4r6ds_ZNKSt8numpunctIcE11do_truenameEvnRf0VQ++OEwlibcnow exports the fivedo_members under these names; its numpunct vtable points at them instead of the private copies it had. The five public members call the facet's vtable slot, as [locale.numpunct.members] requires, so a facet whose vtable overrides ado_member gets the override. Thedo_members read the fields of the 0x30-byte facetlibc's_Getcatalready builds (layout from the consolelibc.prx, see the_Getcatentry indocs/dev/debt/libc.md).libSceLibcInternalforwards to thelibcexports, asAlignedNew.cppdoes. A null facet throwsstd::invalid_argument.The ten placeholder entries in
docs/dev/debt/libSceLibcInternal.mdare replaced by one entry stating what is unverified: the console'slibSceLibcInternal.sprxwas not read and no title was seen calling these exports.numpunct<wchar_t>came from #11773, which is now merged; this branch is rebased on top of it.Tested
41102fb7b6(this head, onmainf6232fcfda, which includes #11773), Windows 11, WinLibs MinGW GCC 16.2.0 (ucrt-posix-seh), Release: the newguest_libc_internal_numpuncttest and the existingguest_locale,guest_libc_internal_aligned_newandguest_libc_internal_mtxtests pass.libSceLibcInternal.prxexports the ten NIDs andlibc.prxthe ten names.python tools/check_conventions.py --base origin/main— passedpython core/libs/tests/test_public_headers.py --audit-only— passedChecklist
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 repositoryImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T11:01:14Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
The exact heads of #14373 and #11773 conflict in two shared libc files, while neither PR declares a dependency.
What I ran
Reviewed #14373 at head
bf185e78ee62efdf4eb26923988a25ff9704006a, based onmainate6f57307fa7f47165d7fc1bee945abdb2f6816e7. Both PRs individually preview cleanly against currentmaine67cc818696fd6e6c58ac80adc6550c54aed68e8; their pairwise merge does not. Environment: Linux x86_64, Python 3.11.2; no compiler was invoked.The ABI and test-quality scripts are local review-workspace helpers and are absent from the PR snapshot. The public-header command ran on the exact #14373
core/libsarchive plus its requiredtools/nid_names.pydependency.Results
passed_with_warnings; its 54 heuristic findings include removed old stubs/private helpers and unrelated existing symbols. The ten new numpunct methods have declarations and definitions; the exact-head public-header audit passed.add_test_executableand registersguest_libc_internal_numpunctwithadd_test.maincore/libs/prx/libc/include/Api.hppandcore/libs/prx/libc/src/LocaleSupport.cpp.intakepassed;conventionsandlabelswere pending at the last query.Unedited selected command output
Pairwise
git merge-treeoutput:python3 tools/pr_overlap.py --branch refs/review/session-20261101/14373:python3 /tmp/anyps5-14373-corelibs/core/libs/tests/test_public_headers.py --audit-only:Findings
Blocking: The PR checklist says
Depends on: none, but the exact #14373 and #11773 heads conflict inlibc/include/Api.hppandlibc/src/LocaleSupport.cpp. #11773 also saysDepends on: none. The repository requires authors of overlapping changes to agree on landing order and declare the dependency. Please coordinate with #11773’s author, record the agreed order in the checklist, and update this branch against the chosen predecessor so the conflict is resolved.Non-blocking: No additional source-level blocker was identified in the narrow char-facet implementation. Its C++ tests were inspected but not executed.
Sources
Not verified
No C++ compilation, CTest, Windows build, or title/console behavior was independently run. The hosted build-dependent checks were not available; the author’s Windows test report is not independently tied to a SHA in the PR description.
To get this to a good state
Agree and document the landing order with #11773’s author, then update the
Depends online and resolve the conflict against the agreed predecessor. I will rerun the same relevant checks on the new head.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T11:50:45Z.
Review: COMMENTED
Re-checked — new head, dependency declared but the branch still conflicts with #11773
The head now declares
Depends on: #11773, which answers the landing-order part of my earlier request, but the branch carries cherry-picked copies of #11773's two commits instead of those commits, and it still conflicts with #11773's current head in two files.What I ran
Exact head
a82a5b1d5c7e27ed8608c338b595bc231a4e5dbf, base currentmainba627802e2210187d417deb64c8f2fed8e33011f. #11773 current head90d4acce8e71ef75bbe0a27925dbc7fe2e87a403. No build, compile or C++ test was run.The precheck's ABI and test-quality helpers could not run in its isolated head tree, so I ran both by hand from
/marc/AnyPS5. The test-quality helper was run on the changed test files at this head.Results
current_dependency_head_not_includedfor #11773 to #14373passed_with_warnings: 1844 symbols, 60 lexical findings, for exampleAssignCStringandCodecvtLength(public declaration not found). Not triaged one by one in this runGuestLibcInternalNumpunct.cppis registered atcore/libs/prx/libSceLibcInternal/CMakeLists.txt:12through a variable, so this is a false positivecore/libs/prx/libc/include/Api.hppandcore/libs/prx/libc/src/LocaleSupport.cpp6ca8946fa5and90d4acce8eshare patch-id07a7f71fbfe565309cf0e25c3a6f143249f59815;ddcf1d1a0dand452d1f32f1share72b7cbcccfb05dfdc04a52442ad855dd6dff467bFindings
Blocking: none.
Non-blocking, with a requested next step:
6ca8946fa5andddcf1d1a0d, which are copies of #11773's90d4acce8eand452d1f32f1with the same content but different commit IDs. #11773's current head is not an ancestor of this head, and the trial merge of the two heads conflicts inApi.hppandLocaleSupport.cpp, the same two files the body names.90d4acce8eso that the two commits are shared rather than copied, and to resolve the two conflicts in this PR's own commit. The alternative is to keep the copies and resolve the conflicts again when #11773 lands. After either change, the stack report should show the dependency head included.Sources
github.com/boykopovar/AnyPS5@a82a5b1d5candgithub.com/boykopovar/AnyPS5@90d4acce8eNot verified
a82a5b1d5care author-reported and were not reproduced.To get this to a good state
Rebase onto #11773's current head, or drop the copies once #11773 has merged, resolve the two conflicts, and rerun the precheck and the stack check on the new head. My review of the source changes will follow the new head.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T14:28:32Z.
Review: COMMENTED
Reviewed — no blocking findings
The ten
std::numpunct<char>exports keep their NIDs and thelibSceLibcInternalexport NID set is unchanged (658 at both the base and the head), so the audit's name-based removals are renames, not removed exports; the locale internals changed inLocaleSupport.cppare mostly relocations, and I did not trace the new wide-string storage path line by line.What I ran
33a00a5158c005081c6507183b0ce6491bd5096d, baseba627802e2210187d417deb64c8f2fed8e33011f./usr/bin/python33.11.2, no build.python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14373 --output-dir /dev/shm/reviewer-run/precheck/14373python3 tools/pr_abi_audit.py --repo /marc/AnyPS5 --base ba627802e2210187d417deb64c8f2fed8e33011f --head 33a00a5158c005081c6507183b0ce6491bd5096d --json(exit 0;passed_with_warnings; 60 findings: 37public-declaration-not-found, 15export-removed, 7definition-not-found; 1,844 symbols). The 15export-removednames areNumpunctDecimalPoint,NumpunctFalsename,NumpunctGrouping,NumpunctThousandsSep,NumpunctTruenameandsceLibcInternalPending4_015to_024.git ls-treeandgit showon both revisions, matching everyAPS5_EXPORT("<NID>", name)pair: 658 NIDs at the base, 658 at the head, none missing and none added.core/libs/tests/GuestLibcInternalNumpunct.cppandcore/libs/tests/GuestLocale.cppfrom a head extract: one literal-path registration heuristic each.core/libs/prx/libSceLibcInternal/Numpunct.cpp(all ten wrappers and theirAPS5_EXPORTlines) and theLocaleSupport.cppdiff, which moves the codecvt vtable and its functions within the file (they are at lines 282-305 and 778 at head).Results
Precheck report, checks table, unedited (
/dev/shm/reviewer-run/precheck/14373/report.md):The precheck deliberately does not configure, build, or compile AnyPS5.git diff --check ba627802e2210187d417deb64c8f2fed8e33011f...33a00a5158c005081c6507183b0ce6491bd5096d/usr/bin/python3 tools/check_conventions.py --base ba627802e2210187d417deb64c8f2fed8e33011f --head 33a00a5158c005081c6507183b0ce6491bd5096d --title feat(libSceLibcInternal): implement the numpunct<char> members --body /dev/shm/reviewer-run/precheck/14373/pr-body.md/usr/bin/python3 tools/pr_abi_audit.py --base ba627802e2210187d417deb64c8f2fed8e33011f --head 33a00a5158c005081c6507183b0ce6491bd5096d --jsonNo changed Python implementation files.No changed tools/ module has an existing sibling tools/tests/test_<module>.py suite.No changed test_*.py files./usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 14373 --repo boykopovar/AnyPS5 --output-dir /dev/shm/reviewer-run/precheck/14373/stackNot run: C++ tests need exact-head binaries, which require a build; the precheck does not build./usr/bin/python3 /dev/shm/reviewer-run/precheck/14373/head-33a00a5158c0-4369572f/tools/pr_test_quality.py --root /dev/shm/reviewer-run/precheck/14373/head-33a00a5158c0-4369572f --json core/libs/prx/libSceLibcInternal/CMakeLists.txt core/libs/prx/libSceLibcInternal/Export.cpp core/libs/prx/libSceLibcInternal/Numpunct.cpp core/libs/prx/libSceLibcInternal/include/Api.hpp core/libs/prx/libc/include/Api.hpp core/libs/prx/libc/include/GuestLocale.hpp core/libs/prx/libc/src/LocaleSupport.cpp core/libs/tests/GuestLibcInternalNumpunct.cpp core/libs/tests/GuestLocale.cpp docs/dev/debt/libSceLibcInternal.md docs/dev/debt/libc.mdNo changed Python test module in tools/ can be run as a no-build base-source control.Negative control
Not run. The C++ test needs a build.
Findings
Blocking: none.
Non-blocking:
public-declaration-not-foundand 7definition-not-foundentries are lexical (the audit also reportsdefinition-not-foundforsetjmp_nid_postfixandlongjmp_nid_postfix, which this PR does not touch, and for the oldNumpunct*names it removed). They are prompts, not defects, but the author should confirm the declarations for the new wrappers are ininclude/Api.hpp.AssignWideCStringallocates for strings longer than the inline capacity and setscapacity = length | GuestWideInlineCapacity. I did not trace the storage rules against the existing narrow path; the test atGuestLocale.cppshould cover a string longer than the inline capacity.Sources
github.com/boykopovar/AnyPS5@33a00a5158/core/libs/prx/libSceLibcInternal/Numpunct.cppgithub.com/boykopovar/AnyPS5@33a00a5158/core/libs/prx/libc/src/LocaleSupport.cpp (L282-L305)Not verified
guest_libc_internal_numpunctandguest_localewere not built or run here.AssignWideCString) was not traced line by line.conventions(one run cancelled, one succeeded) andlabelshad reported; the other jobs had not.