feat(libSceLibcInternal): run the ios_base complete-object destructor #14664
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14664"
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:58:40Z.
What
Implements
X9D8WWSG3As(_ZNSt8ios_baseD1Ev) inlibSceLibcInternal, which threwNotImplemented.ios_basehas no virtual bases, so under the Itanium C++ ABI its complete-object destructor (D1) does the same work as the base-object one (D2). The export runs the existinglibcexport_ZNSt8ios_baseD2Evand keeps its limits: it throws for stream storage, callbacks or a locale other than the classic one. The stub and its stub entry are removed, and a debt entry records what is unverified: the console'slibSceLibcInternal.sprxwas not read and no title was seen calling it.The old stub name
sceLibcInternalUnknown6_084_X9D8WWSG3As_nid_no_patchis retired intentionally. The replacement keeps the same NIDX9D8WWSG3As; the ABI audit'sexport-removedwarning refers to the old C symbol, not a removed guest export.Tested
Ubuntu 24.04, GCC, Release,
BUILD_TESTING=ON, full build:tools/check_conventions.py --base origin/mainpasses.guest_libc_internal_ios_base: the destructor releases the classic locale without writing outside the stream, leaves the stream as thelibcD2does, and throws for a null stream. It passes, together withguest_locale,guest_libc_internal_aligned_new,guest_libc_internal_mtx,guest_init_onceandguest_libc_threads.libSceLibcInternal.prxexports the NID 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:49Z.
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:19:59Z.
Review: COMMENTED
Reviewed — no blocking findings
The change implements
_ZNSt8ios_baseD1Ev(NIDX9D8WWSG3As) by calling the existing base-object destructor export, the same pattern as the_Paddestructor in the libc work. The NID matches under the repo's tool, the base-object export exists, and its checks match the limits in the debt entry. The new guest test passed in the hosted Windows CTest run at this head (2595 of 2595 cases, includingguest_libc_internal_ios_base). The ABI audit reports one removed export, the old stub name, which keeps the same NID. Approval waits for the macOS relinker jobs, which were queued at review time.What I ran
09abe24e53efd61ef8438b996ec302da69889dbf; basef2d874c1fdccf781c0fa5d86619bb5dd8894b958. 6 files, +90/-7:IosBase.cpp(new),CMakeLists.txt,InventoryExports6.cpp(stub removed),include/Api.hpp,tests/GuestLibcInternalIosBase.cpp(new) anddocs/dev/debt/libSceLibcInternal.md.tools/nid_names.pycompute_nid('_ZNSt8ios_baseD1Ev')returnsX9D8WWSG3As, the NID in the new export and the one the removed stub used._ZNSt8ios_baseD2Ev_nid_postfixexists incore/libs/prx/libc/src/LocaleSupport.cpp(line 648). Its body throws for a null object, for stream storage or callbacks, and for a locale other than the classic one, which matches the debt entry. It clearslocaleand touches nothing else.IosBase::localeisImplementation**(libc/include/GuestLocale.hppline 112), so the comparison with&_ZSt21_sceLibcClassicLocale_nid_postfixis between compatible types.passed_with_warnings, 240 symbols; oneexport-removedfinding forsceLibcInternalUnknown6_084_X9D8WWSG3As_nid_no_patch, the stub replaced here with the same NID.guest_libc_internal_ios_base(Test #2288).Results
X9D8WWSG3Asfor_ZNSt8ios_baseD1Evtools/nid_names.pyLocaleSupport.cppline 648localepointer typeImplementation**matches the comparisonguest_libc_internal_ios_basein the windows CTest runCommands and unedited precheck output
Commands:
python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14664 --output-dir <scratch>/precheck/14664p(report.md in that directory).git fetch https://github.com/boykopovar/AnyPS5.git pull/14664/head.python3 tools/pr_abi_audit.py --base f2d874c1fdccf781c0fa5d86619bb5dd8894b958 --head 09abe24e53efd61ef8438b996ec302da69889dbf --json.tools/nid_names.pycompute_nidon_ZNSt8ios_baseD1Evand_ZNSt8ios_baseD2Ev.gh api repos/boykopovar/AnyPS5/commits/09abe24e53efd61ef8438b996ec302da69889dbf/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...09abe24e53efd61ef8438b996ec302da69889dbf/marc/DeusMachina_0x1914/.venv/bin/python3 tools/check_conventions.py --base f2d874c1fdccf781c0fa5d86619bb5dd8894b958 --head 09abe24e53efd61ef8438b996ec302da69889dbf --title feat(libSceLibcInternal): run the ios_base complete-object destructor --body /dev/shm/reviewer-run/precheck/14664p/pr-body.md/marc/DeusMachina_0x1914/.venv/bin/python3 tools/pr_abi_audit.py --base f2d874c1fdccf781c0fa5d86619bb5dd8894b958 --head 09abe24e53efd61ef8438b996ec302da69889dbf --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 14664 --repo boykopovar/AnyPS5 --output-dir /dev/shm/reviewer-run/precheck/14664p/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/14664p/head-09abe24e53ef-483f7f99/tools/pr_test_quality.py --root /dev/shm/reviewer-run/precheck/14664p/head-09abe24e53ef-483f7f99 --json core/libs/prx/libSceLibcInternal/CMakeLists.txt core/libs/prx/libSceLibcInternal/InventoryExports6.cpp core/libs/prx/libSceLibcInternal/IosBase.cpp core/libs/prx/libSceLibcInternal/include/Api.hpp core/libs/tests/GuestLibcInternalIosBase.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
export-removedwarning forsceLibcInternalUnknown6_084_X9D8WWSG3As_nid_no_patchis expected, since the NID is kept. Please say in the PR body that the stub name is retired on purpose.Sources
github.com/boykopovar/AnyPS5@09abe24e53/core/libs/prx/libSceLibcInternal/IosBase.cppgithub.com/boykopovar/AnyPS5@09abe24e53/core/libs/tests/GuestLibcInternalIosBase.cppgithub.com/boykopovar/AnyPS5@09abe24e53/core/libs/prx/libc/src/LocaleSupport.cpp (L648-L658)github.com/boykopovar/AnyPS5@09abe24e53/docs/dev/debt/libSceLibcInternal.mdNot verified
libSceLibcInternalwas not read, as the debt entry itself says.To get this to a good state