Repository navigation
feat(libSceLibcInternal): implement std::exception::_Set_raise_handler - #19767
oneandonlydean merged 5 commits into
Conversation
Swap the handler that exception::_Raise calls before it throws and return the previous one, as Dinkumware's exception header does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Linux test report for e8e14a8, merged onto
An observation outside this PR's lines, since the PR cites that header: the same |
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Tested
AI-assisted: yes (Claude Code); the runs are automated, this summary was written from their reports. |
|
Windows check of head Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release. The hosted Windows check does not run these tests on pull requests.
AI-assisted: yes. |
Progress report (fbd2175 → 484431d)📈 System libraries: 46.91% (+0.0025%, +1 implemented function) ✅ 1 implemented
Changed libraries (implemented exports)
|
…ced after the facet-table fix
Drop both conflicting InventoryExports6.hpp declarations: main implements messages<wchar_t>::messages in Messages.cpp and this branch implements exception::_Set_raise_handler in ExceptionVirtuals.cpp.
|
@nexus7super-ship-it I merged main into the branch (4e773a5) to clear the conflict in include/InventoryExports6.hpp. Both sides had removed a different inventory declaration on the same line, so I dropped both: main now implements messages<wchar_t>::messages in Messages.cpp and your branch implements _Set_raise_handler in ExceptionVirtuals.cpp. guest_libc_internal_exception_virtuals passes on the merge and debt_fold.py --check is clean. Please pull before your next push. |
MarcZX10
left a comment
There was a problem hiding this comment.
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, base main.
What I ran
- Read the description, commit list, manifest and diff (8 changed files, all in
files.jsonunderreviewed). - Read the house rules for readable reviews, accuracy and the response format.
- Targeted reads through
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 8
- No build and no test run in this review.
Results
| Check | Result | Note |
|---|---|---|
| Diff read, all 8 files | passed | Changed hunks only |
| Symbol and caller search | passed | One definition per symbol, no leftover stub |
| Build and unit tests | not run | Author-reported only |
| Export NID binding | not verified | See Not verified |
Findings
Blocking
None.
Non-blocking
None that the code I read shows as a defect.
Sources
- Handler storage and exchange:
core/libs/prx/libc/src/exception/StandardExceptions.cpp:411-417(commit 4e773a5). - Raise call before throw:
core/libs/prx/libc/src/exception/StandardExceptions.cpp:443-444. - New export and removed stub:
core/libs/prx/libSceLibcInternal/ExceptionVirtuals.cpp:81-84andcore/libs/prx/libSceLibcInternal/InventoryExports6.cpp:337(removed).
Not verified
- The author's test run (
guest_libc_internal_*,exception_runtime,public_headers,conventions_*,progress_report, 129 tests on Linux, GCC, Release). I did not build or run it. - The export NID
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. - Behaviour on a console. Nothing here was run on hardware, and the console's
std::_Raise_handlervariable is not covered (the debt doc says so). - Whole-file review. I read the changed hunks of all 8 files and the surrounding lines of two of them. I did not read the full text of each file.
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+a0 is generated from the new mangled name.
|
Tested head Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release,
Whole batch: the full This is one combined tree, not a run of this PR alone. AI-assisted: yes (Claude Code) |
# Conflicts: # core/libs/prx/libc/include/Api.hpp
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
Nothing blocks this change; the reviewed implementation and its focused test support merging.
What I ran
Reviewed head 484431d7cf068a7084ec97f18971f61f1fc21b67 using the prepared review bundle and pinned repository reader. No tests or builds were run.
Results
| Check | Result | Note |
|---|---|---|
| Change and targeted source review | passed | All changed files were included and read. |
| Tests and build | not run | Author-reported results were not independently run. |
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 in manifest.json were 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, and docs/dev/debt/libSceLibcInternal.md. None were excluded.
To get this to a good state
Nothing is required.
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