feat(libc): export the std::error_category complete and deleting destructors #15796
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15796"
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 Danigamer05 on 2026-11-04T16:16:07Z.
What
Export the complete-object and deleting destructors of
std::error_categoryfrom libc._ZNSt14error_categoryD1Evft5HxbN0c1o0xB4470_ZNSt14error_categoryD0Ev6CcKkO-b8-00xB4480The behavior comes from the
libc.prxbundled with PPSA03671 v01.001.005 (J03848509, SHA-256483961e086b8a1fffa8138b3c0badf798987fb5f35ec908d828946408be2d8a6).In the module:
D1is a singleretat the same address as the base-object destructorD2, which main already exports as an empty function.D1is the same empty function;D0is a singleud2: deleting anerror_categorythrough this destructor traps. It throwsstd::runtime_errorhere instead, with the text thatAtomicBuiltins.cppuses for the console'sud2paths. The debt entry records that difference.Tested
Windows x86-64, WinLibs GCC 15.2.0, Release,
BUILD_TESTING=ON, mainb11c7bf84f5. Exact tested commit:7ea5bf5e5f6.libc.exports.guest_future_categorypasses with the new checks, along withguest_sce_v2_exceptions,guest_filesystem_error,guest_libc_internal_exception_destructors,exception_personality,windows_exceptionsandpublic_headers.guest_future_categorynow callsD1next to the existingD2call, and checks thatD0throws astd::runtime_errornaming the console trap.D1does nothing, andD0would stop the harness.D0threwstd::logic_error, andD1calledD0.guest_future_categoryfailed on each. The source was then restored byte for byte (SHA-256 checked) and rebuilt, and the test passed again.git diff --checkpass.tools/pr_overlap.pyread 1,863 open PRs at the tested commit and reports no overlap. It keeps exit 2 for 25 branches that already conflict with main. Merging each of the 25 with this branch and with main usinggit merge-treegives the same conflict blocks. Only #13486 names a related symbol: it lists the destructors of the derived_Future_error_category,_System_error_category,_Generic_error_categoryand_Iostream_error_categoryin a table, not these two. The branch also merges cleanly with #15336, #15471, #15484, #15490, #15501, #15519, #15552, #15561, #15602, #15614, #15667, #15683 and #15791.Not tested: Linux, macOS, another SDK, a game, GPU or console. No game compatibility claim. No original module, extracted bytes, harness or log is committed or uploaded.
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