feat(libSceLibcInternal): run the base-object destructors of future_error, overflow_error and underflow_error #14659
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14659"
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:32Z.
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:XFh0C66aEms(_ZNSt12future_errorD2Ev)OypvNf3Uq3c(_ZNSt14overflow_errorD2Ev)xiqd+QkuYXc(_ZNSt15underflow_errorD2Ev)They are the base-object (
D2) destructors of classes without virtual bases. The Itanium C++ ABI defines the complete-object destructor as the base-object one plus the virtual bases, so for these classesD1andD2do the same work. Each export runs the existinglibcexport of theD1name (_ZNSt12future_errorD1Ev,_ZNSt14overflow_errorD1Ev,_ZNSt15underflow_errorD1Ev), the same wayAlignedNew.cppreuseslibc(#14240). The three stubs, their declarations and their table rows 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_exception_destructors: releases aruntime_errormessage through the overflow/underflowD2, resets inline and heapfuture_errormessages (the heap one is freed once) and leaves the object as thelibcD1does. It passes, together withguest_libc_internal_aligned_new,guest_libc_internal_mtx,guest_init_once,guest_localeandguest_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:47Z.
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:22:03Z.
Review: COMMENTED
Reviewed — no blocking findings
Three inventory stubs become base-object destructors for
future_error,overflow_errorandunderflow_error. Each NID matches theD2name it implements under the repo's NID tool, and the code calls the complete-objectD1exports that libc defines (libc/src/exception/StandardExceptions.cppandStandardExceptions.cppline 751). The new guest test passed in the hosted Windows CTest run at this head (2595 of 2595 cases, includingguest_libc_internal_exception_destructors). 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
8bb5e09df8eaf393dff7c732f591dddd26a24bf6; basef2d874c1fdccf781c0fa5d86619bb5dd8894b958. 7 files, +134/-21:ExceptionDestructors.cpp(new),CMakeLists.txt,InventoryExports.cpp(three stubs removed),include/Api.hpp,include/InventoryExports.hpp,tests/GuestLibcInternalExceptionDestructors.cpp(new) anddocs/dev/debt/libSceLibcInternal.md.tools/nid_names.py:_ZNSt12future_errorD2Ev=XFh0C66aEms,_ZNSt14overflow_errorD2Ev=OypvNf3Uq3c,_ZNSt15underflow_errorD2Ev=xiqd+QkuYXc. These are the NIDs of the three new exports and of the three stubs they replace._ZNSt14overflow_errorD1Ev_nid_postfixand_ZNSt15underflow_errorD1Ev_nid_postfix(core/libs/prx/libc/src/exception/StandardExceptions.cpplines 538 and 542) and_ZNSt12future_errorD1Ev_nid_postfix(line 751). The new exports call those names.passed_with_warnings, 392 symbols; threeexport-removedfindings forlibSceLibcInternalInventory_018,_044and_051, each with its NID kept by the new export.guest_libc_internal_exception_destructors.Results
XFh0C66aEms,OypvNf3Uq3c,xiqd+QkuYXcmatch theD2namesD1exports defined inStandardExceptions.cppguest_libc_internal_exception_destructorspassed in the windows CTest runCommands and unedited precheck output
Commands:
python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14659 --output-dir <scratch>/precheck/14659p(report.md in that directory).git fetch https://github.com/boykopovar/AnyPS5.git pull/14659/head.python3 tools/pr_abi_audit.py --base f2d874c1fdccf781c0fa5d86619bb5dd8894b958 --head 8bb5e09df8eaf393dff7c732f591dddd26a24bf6 --json.tools/nid_names.pycompute_nidon the six names above.gh api repos/boykopovar/AnyPS5/commits/8bb5e09df8eaf393dff7c732f591dddd26a24bf6/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...8bb5e09df8eaf393dff7c732f591dddd26a24bf6/marc/DeusMachina_0x1914/.venv/bin/python3 tools/check_conventions.py --base f2d874c1fdccf781c0fa5d86619bb5dd8894b958 --head 8bb5e09df8eaf393dff7c732f591dddd26a24bf6 --title feat(libSceLibcInternal): run the base-object destructors of future_error, overflow_error and underflow_error --body /dev/shm/reviewer-run/precheck/14659p/pr-body.md/marc/DeusMachina_0x1914/.venv/bin/python3 tools/pr_abi_audit.py --base f2d874c1fdccf781c0fa5d86619bb5dd8894b958 --head 8bb5e09df8eaf393dff7c732f591dddd26a24bf6 --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 14659 --repo boykopovar/AnyPS5 --output-dir /dev/shm/reviewer-run/precheck/14659p/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/14659p/head-8bb5e09df8ea-5cd3eefe/tools/pr_test_quality.py --root /dev/shm/reviewer-run/precheck/14659p/head-8bb5e09df8ea-5cd3eefe --json core/libs/prx/libSceLibcInternal/CMakeLists.txt core/libs/prx/libSceLibcInternal/ExceptionDestructors.cpp core/libs/prx/libSceLibcInternal/InventoryExports.cpp core/libs/prx/libSceLibcInternal/include/Api.hpp core/libs/prx/libSceLibcInternal/include/InventoryExports.hpp core/libs/tests/GuestLibcInternalExceptionDestructors.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-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@8bb5e09df8/core/libs/prx/libSceLibcInternal/ExceptionDestructors.cppgithub.com/boykopovar/AnyPS5@8bb5e09df8/core/libs/tests/GuestLibcInternalExceptionDestructors.cppgithub.com/boykopovar/AnyPS5@8bb5e09df8/core/libs/prx/libc/src/exception/StandardExceptions.cpp (L538-L542)and #L751github.com/boykopovar/AnyPS5@8bb5e09df8/docs/dev/debt/libSceLibcInternal.mdNot verified
libSceLibcInternalwas not read, as the debt entry says.To get this to a good state