feat(libSceLibcInternal): forward the numpunct<char> destructors to libc #27697
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/27697"
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 berkay8987 on 2026-11-27T02:34:35Z.
What
libSceLibcInternal exported throwing stubs for the three
numpunct<char>destructors: D1qEob3o53s2M, D2xFva4yxsVW8and D0Lf6h5krl2fA. libc implements those NIDs, so a title that imports them from libSceLibcInternal hit the stub. The complete and base object destructors now call libc'sNumpunctDestroy, which runs_Tidy. The deleting destructor callsNumpunctDelete, which runs_Tidyand thenoperator delete. The pattern follows #24573, so the forwards cannot bind to themselves after NID patching. The debt entries move to a Functional entry that points at the libc limits.Tested
Windows 11, MSYS2 UCRT64 GCC 16.2, Release.
guest_libc_internal_deleting_destructorsnow builds a facet with libc and checks three things. D1 and D2 release its three strings and reject a null facet. D0 releases the strings and then the facet, and rejects a null facet. It passes.guest_libc_internal_libc_forwardsalso passes.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
Readings taken: the libSceLibcInternal exports take the libc signatures and bodies for the same NIDs. Neither
.sprxbody was read. This branch andfeat/libcinternal-numpunct-char-constructorsadd the sameGuestLocale.hppinclude toInventoryExports.hpp, so whichever merges second may need a trivial rebase.Manual comparison, because
pr_overlap.pyfailed closed on the shared inventory files: #13778, #18135, #19602 and #24880 do not touch these exports. #25573 deletes theInventoryExports.hppdeclarations of inventory 161-167 without implementing those NIDs, so whichever merges second has a textual conflict in that header. #19864 adds lines toGuestLibcInternalDeletingDestructors.cppnext to this branch's test additions; the exports differ.Summary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-11-27T02:44:19Z.
Review: APPROVED
Reviewed the six-file diff at
bc2308e0ba4a2fa9ebbc75e8f72044dbf81cc94dplus the existing libc helpers and test-registration context. No blocking findings in that scope.The D1/D2 forwards call
NumpunctDestroy_nid_no_patch; D0 callsNumpunctDelete_nid_no_patch, preserving the non-deleting/deleting distinction and avoiding a call through the patchable same-NID export names. The declarations keepAPS5_VABIand the libc helper's pointer/void signature. The fixture checks the three string releases, the additional facet release for D0, and null rejection.Independent Linux check: Linux7.3.5-arch1-1, GCC16.2.1, Release, SPIRV-Tools disabled. Exact PR head, separate checkout/build:
guest_libc_internal_deleting_destructorsandguest_libc_internal_libc_forwardsboth pass (2/2, zero skips). Loader traces initialize that build's raw libc, libkernel and libSceLibcInternal; source, provider and executable hashes stay unchanged. Conventions, debt-fragment validation and whitespace checks pass.Commands, complete logs/JUnit, source identities and loader/hash receipts — 17 payloads; anonymous download and all payload hashes verified. Archive SHA-256
0bb15b593ac0ce595a87039c24eb5eb56c503bac63ab584555d36c8dca18194e.This verifies the Linux host-side forwards and their existing fixture coverage. I did not inspect console
.sprxbodies, run a patched title, independently repeat Windows testing, or measure performance. The inherited ABI/body and null-console-fault limitations remain as documented in the fragment.AI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-27T02:53:16Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; it forwards the three destructor exports to the corresponding libc implementations and updates declarations and regression coverage.
What I ran
Inspected the prepared diff and all six changed files at head
bc2308e0ba4a2fa9ebbc75e8f72044dbf81cc94d, plus the libc destructor implementations andNumpunctFacetdefinition usingrepo_read.py. No build or tests were run; the test results in the PR description are author-reported.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
Did not run the reported Windows build or tests. Did not inspect either console
.sprxdestructor body, so equivalence with libc behavior on console remains unverified. The bundle'sfiles.jsonwas not available; the manifest lists six changed files, and all six were read. No excluded files were identified in the available bundle listing.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by Plyxen on 2026-11-27T03:40:15Z.
Review: APPROVED
Checked head
bc2308e0ba, applied alone tomainad7582bad4. On Windows 11 with WinLibs GCC 15.2 (Release),tools/check_conventions.py --headandtools/debt_fold.py --checkpassed, the build succeeded, and all 4,930 CPU tests passed (I left out the GPU tests).guest_libc_internal_deleting_destructorspassed. Onmainthe three exports throw throughNotImplemented_nid_no_patch, so the new checks can't pass there.tools/nid_names.pygivesqEob3o53s2Mfor_ZNSt8numpunctIcED1Ev,xFva4yxsVW8forD2andLf6h5krl2fAforD0. libc already exportsxFva4yxsVW8asNumpunctDestroy_nid_no_patchandLf6h5krl2fAasNumpunctDelete_nid_no_patch(LocaleSupport.cpp:2465,:2471). So the complete-object and base-object destructors both runNumpunctDestroy, and the deleting one runsNumpunctDelete, which is right for a class without virtual bases. The test checks that three frees happen (grouping and the two bool names), plus the object forD0, and that a null facet throws. The debt entry says thelibSceLibcInternal.sprxbodies were not read.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T09:58:05Z.
Review: COMMENTED
The GuestLibcInternalDeletingDestructors fixture passed on Linux with the exact changed sources. The fixture verifies cleanup of the three facet-owned strings, facet deletion and null-argument handling.
AI-assisted: yes.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.