feat(libSceLibcInternal): implement std::exception::_Set_raise_handler #19767
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/19767"
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 nexus7super-ship-it on 2026-11-13T22:18:07Z.
What
Implements
std::exception::_Set_raise_handler(void (*)(const std::exception&))(libSceLibcInternal, NIDBin7e2UR+a0), which threw throughNotImplemented_nid_no_patch.It follows Dinkumware's VC12 exception header:
_Set_raise_handlerstores the new handler and returns the previous one, andexception::_Raisecalls the handler with the exception before it throws. The handler is kept in libc next to_Raise(an atomic exchanged throughLibcExchangeRaiseHandler_nid_no_patch), and libc's_Raisenow calls it. No export of the console'sstd::_Raise_handlervariable is known, so a title that writes that variable directly is not seen; this is recorded indocs/dev/debt/libSceLibcInternal.md.Tested
Linux (Ubuntu, GCC), Release build with
BUILD_TESTING=ON:guest_libc_internal_exception_virtualsgains a check that the handler is installed, called once with the raised object, swapped and cleared; all 44guest_libc_internal_*tests andexception_runtimepass, as dopublic_headers,conventions_*andprogress_report(129 tests).python3 tools/check_conventions.py --base origin/mainpasses.tools/pr_overlap.pyreports only shared files, no shared exports. No title was run.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
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-17T21:14:03Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this; the points below are optional. The diff is consistent with the stated goal, and the tests the author reports were not run here.
Head reviewed:
4e773a54787a997f9045729d0ec33b7ee918c6a5, basemain.What I ran
files.jsonunderreviewed).repo_read.py:search _Set_raise_handlersearch LibcExchangeRaiseHandlersearch Bin7e2URsearch "define APS5_EXPORT"cat core/libs/prx/libc/src/exception/StandardExceptions.cpp 402 420cat core/libs/prx/libSceLibcInternal/include/ExceptionVirtuals.hpp 1 8Results
Findings
Blocking
None.
Non-blocking
None that the code I read shows as a defect.
Sources
core/libs/prx/libc/src/exception/StandardExceptions.cpp:411-417(commit4e773a5478).core/libs/prx/libc/src/exception/StandardExceptions.cpp:443-444.core/libs/prx/libSceLibcInternal/ExceptionVirtuals.cpp:81-84andcore/libs/prx/libSceLibcInternal/InventoryExports6.cpp:337(removed).Not verified
guest_libc_internal_*,exception_runtime,public_headers,conventions_*,progress_report, 129 tests on Linux, GCC, Release). I did not build or run it.Bin7e2UR+a0. It appears only indocs/dev/debt/libSceLibcInternal.md. The new function has noAPS5_EXPORTline, the same as the stub it replaces, so the binding comes from the mangled name. I did not check the generator that maps names to NIDs.std::_Raise_handlervariable is not covered (the debt doc says so).To get this to a good state
Nothing is required.
Optional: confirm that the author's test run is reproduced on this head, and that the NID mapping for
Bin7e2UR+a0is generated from the new mangled name.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T12:50:10Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the reviewed implementation and its focused test support merging.
What I ran
Reviewed head
484431d7cf068a7084ec97f18971f61f1fc21b67using the prepared review bundle and pinned repository reader. No tests or builds were run.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
No tests/builds, console behavior, or title compatibility were verified. The author reports Linux test results in
description.md; these were not run here. All seven changed files listed inmanifest.jsonwere read:core/libs/prx/libSceLibcInternal/ExceptionVirtuals.cpp,core/libs/prx/libSceLibcInternal/InventoryExports6.cpp,core/libs/prx/libSceLibcInternal/include/ExceptionVirtuals.hpp,core/libs/prx/libSceLibcInternal/include/InventoryExports6.hpp,core/libs/prx/libc/include/Api.hpp,core/libs/prx/libc/src/exception/StandardExceptions.cpp,core/libs/tests/GuestLibcInternalExceptionVirtuals.cpp, anddocs/dev/debt/libSceLibcInternal.md. None were excluded.To get this to a good state
Nothing is required.