feat(libSceLibcInternal): run the ios_base deleting destructor #14836
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14836"
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-01T19:18:13Z.
What
Implements
I5jcbATyIWo(_ZNSt8ios_baseD0Ev) inlibSceLibcInternal, which threwNotImplemented.It is the deleting destructor of
ios_base. Under the Itanium C++ ABI that is the complete-object destructor followed by the class'soperator delete, andios_basedeclares none of its own. So the export runs the existinglibcexport_ZNSt8ios_baseD2Ev(the same work asD1, with its limits: it throws for stream storage, callbacks or a locale other than the classic one) and then_ZdlPv, which frees on the application heap thatoperator newallocates from. The stub, its declaration and its table row are removed, and a debt entry records what is unverified: the console'slibSceLibcInternal.sprxwas not read and no title was seen calling it.This builds on #14664, which adds the complete-object destructor in the same file.
Tested
Ubuntu 24.04, GCC 13.3, Release,
BUILD_TESTING=ON, full build:tools/check_conventions.py --base origin/mainpasses.guest_libc_internal_ios_baseis extended with a recording application heap: the deleting destructor frees a heap-allocated stream once throughoperator deleteand throws for a null stream. It passes, together withguest_libc_internal_aligned_new,guest_libc_internal_mtx,guest_init_once,guest_localeandguest_libc_threads.libSceLibcInternal.prxexportsI5jcbATyIWoand theD1NIDX9D8WWSG3Asonce each.libSceLibcInternalbranches (#14659, #14660, #14664, #14666) and the merged tree builds and passes their tests.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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T19:25:42Z.
Review: COMMENTED
Reviewed — no blocking findings
I reviewed all eight changed files at head
9f6eaa2597c3f2ee43d9008b245ca15e35d13dd8and found no source-level blocker; approval is withheld while the hosted Windows job is pending.What I ran
The PR is based on
f2d874c1fdccf781c0fa5d86619bb5dd8894b958and declares dependency #14664. The stack check confirms #14664’s exact head is included and both preview cleanly against currentmain(e0caf1360035286bd22b9f2a3030e97b880ffb28). Environment: Linux x86_64, Debian 12, Python 3.11.2, Git 2.39.5. I did not build or compile.Results
Unedited output excerpts
Negative control
Not run. I did not mutate the destructor or allocator call to test whether the new C++ test detects an incorrect destruction/free sequence.
Findings
Blocking
None found in the eight changed files. The implementation dispatches the complete-object destructor through the existing
ios_basedestructor and then the application-heap delete export; the new test is registered in CMake and checks the freed pointer and null-stream paths.Non-blocking
The PR reports a full Ubuntu 24.04/GCC 13.3 build and focused tests passing; I did not independently rerun them. The hosted Windows job is still pending, so this review does not approve the change yet.
Sources
Not verified
No local build, C++ test, Windows/macOS run, PS5 run or title compatibility test was performed. Hosted Windows remained pending; Linux and specialized jobs were skipped. The author-reported build and tests were read from the PR description only.
To get this to a good state
No source change is requested. Once the hosted Windows job completes, I will recheck the exact head and required checks before deciding whether approval is appropriate.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T19:38:56Z.
Review: APPROVED
Re-checked — Windows CI passed, approved
The exact head is unchanged, its hosted Windows build and test job passed, and my earlier full source review found no blocker.
What I ran
Rechecked head
9f6eaa2597c3f2ee43d9008b245ca15e35d13dd8against basef2d874c1fdccf781c0fa5d86619bb5dd8894b958using GitHub’s live PR and check state. Environment: Debian 12 x86_64; no local build or compiler run.Results
Captured hosted-check output
Findings
Blocking
None found in the previously reviewed source.
Non-blocking
The author-reported Linux build and focused tests were not independently rerun here.
Sources
Not verified
No local build, C++ test execution, Linux/macOS test, PS5 run or title compatibility test was performed in this follow-up. Linux and specialized hosted jobs were skipped.
To get this to a good state
No further action is needed for the reviewed head. If it changes, I will review the new head and its checks.