feat(libSceLibcInternal): forward error category destructors and overflow errors #15697
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15697"
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 B-Howell on 2026-11-04T07:30:30Z.
What
Implements five existing
libSceLibcInternalstubs using the correspondinglibcbehavior.main_ZNSt22_Future_error_categoryD0EvWDKzMM-uuLElibSceLibcInternalInventory_054libc_ZNSt14error_categoryD2Ev, then_ZdlPv_ZNSt22_System_error_categoryD0EvDc4ZMWmPMl8libSceLibcInternalInventory_055libc_ZNSt14error_categoryD2Ev, then_ZdlPv_ZNSt22_System_error_categoryD1EvhVQgfGhJz3UlibSceLibcInternalInventory_056libc_ZNSt14error_categoryD2Ev_ZNSt23_Generic_error_categoryD1EvMAalgQhejPclibSceLibcInternalInventory_057libc_ZNSt14error_categoryD2Ev_ZSt16_Xoverflow_errorPKcsaSUnPWLq9ElibSceLibcInternalInventory_242std::overflow_errorthroughlibc's_Xthrower helper54d74d7a58e8giveserror_categorya defaulted virtual destructor,_CONSTEXPR20 virtual ~error_category() noexcept = default;(stl/inc/system_errorL91), and the derived categories declare none of their own.libcalready exports that destructor as_ZNSt14error_categoryD2Evwith an empty body (core/libs/prx/libc/src/exception/StandardExceptions.cpp), soD1runs it. The Itanium C++ ABI defines the deleting destructor as the complete-object destructor followed by the deallocation function, soD0runs it and thenlibcoperator delete(void*)(_ZdlPv)._Xoverflow_error: microsoft/STLstl/src/xthrow.cppL26-L28 is_THROW(overflow_error(_Message));.libcthrows its other unversioned_Xerrors (_Xinvalid_argument,_Xruntime_error,_Xrange_error) withLibcException::ThrowMessageand the matching vtable. This PR addsLibcThrowOverflowError_nid_no_patchnext to them inStandardExceptions.cpp, with_ZTVSt14overflow_error_nid_postfix, and the export calls it, so the guest catchesstd::overflow_error(unversioned), as the mangled nameSt14overflow_errorsays.The mutex name override landed separately in #16029. This branch uses that implementation from
mainand retains the guest mutex integration test. The progress report counts five additional implementations. Console ABI for the five forwards remains unverified.Tested
45c2968563. Dean’s latest change removes the duplicate mutex debt entry. The fixture continues to exercise category destruction, overflow exception handling, and the upstream mutex integration.ca6321bbfd, Windows and WSL each passed five focused selectors 3/3 and public headers 65/65.a7fa6cf6a7.183889c23bpassedguest_libc_internal_libc_forwards3/3 under WinLibs GCC 15.2 UCRT.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
🤖 Updated with Codex