feat(libc): raise logic_error::_Doraise and _Xruntime_error #6072

Merged
notaxeltv merged 1 commit from upstream-pr/6072 into main 2026-10-17 04:53:24 +00:00
notaxeltv commented 2026-10-14 21:21:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by notaxeltv on 2026-10-14T21:21:39Z.


What

tools/import_audit.py on PPSA34015 (EA SPORTS FC 27) reports absent libc.prx imports, first in registry order:

YTM5eyFGh2c  _ZNKSt11logic_error8_DoraiseEv
y7aMFEkj4PE  _ZSt15_Xruntime_errorPKc

std::exception::_Doraise / _Raise and the other _X* helpers already exist. logic_error::_Doraise now rethrows through ThrowMessage with the object's message (same pattern as _Xout_of_range). _Xruntime_error throws runtime_error the same way as the neighbouring helpers.

Tested

Windows 10, WinLibs GCC 15.2.0. New guest_message_destructor_runtime-* and guest_message_destructor_doraise-* modes pass. tools/check_conventions.py --base upstream/main passes. With the patched libc.prx FC 27 still later faults on a null call in Job0 (separate from these absents).

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source (none)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: PPSA34015 (absent libc imports)
  • GPUs tested: n/a
  • AI-assisted: yes

Made with Cursor

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4864704579 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6072). Originally posted by [notaxeltv](https://github.com/notaxeltv) on 2026-10-14T21:21:39Z. --- ### What `tools/import_audit.py` on PPSA34015 (EA SPORTS FC 27) reports absent `libc.prx` imports, first in registry order: ``` YTM5eyFGh2c _ZNKSt11logic_error8_DoraiseEv y7aMFEkj4PE _ZSt15_Xruntime_errorPKc ``` `std::exception::_Doraise` / `_Raise` and the other `_X*` helpers already exist. `logic_error::_Doraise` now rethrows through `ThrowMessage` with the object's message (same pattern as `_Xout_of_range`). `_Xruntime_error` throws `runtime_error` the same way as the neighbouring helpers. ### Tested Windows 10, WinLibs GCC 15.2.0. New `guest_message_destructor_runtime-*` and `guest_message_destructor_doraise-*` modes pass. `tools/check_conventions.py --base upstream/main` passes. With the patched `libc.prx` FC 27 still later faults on a null call in `Job0` (separate from these absents). ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's technical debt file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source (none) - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: PPSA34015 (absent libc imports) - [x] GPUs tested: n/a - [x] AI-assisted: yes Made with [Cursor](https://cursor.com)
github-actions[bot] commented 2026-10-14 21:22:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-14T21:22:25Z.


Progress report (4808d9c → 70c0804)

📈 System libraries: 88.7% (+0.01%, +2 implemented functions)

✅ 2 implemented
Library Name
libc _ZNKSt11logic_error8_DoraiseEv_nid_postfix
libc _ZSt15_Xruntime_errorPKc_nid_postfix
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6178794152 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6072#issuecomment-6178794152). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-14T21:22:25Z. --- <!-- progress-report --> ### Progress report (4808d9c → 70c0804) 📈 **System libraries**: 88.7% (+0.01%, +2 implemented functions) <details> <summary>✅ 2 implemented</summary> | Library | Name | | - | - | | libc | `_ZNKSt11logic_error8_DoraiseEv_nid_postfix` | | libc | `_ZSt15_Xruntime_errorPKc_nid_postfix` | </details>
github-actions[bot] commented 2026-10-15 12:14:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T12:14:12Z.


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.

Pull request Shared files not compared
PR 5021 core/libs/prx/libc/CMakeLists.txt
PR 5668 core/libs/prx/libc/CMakeLists.txt
PR 6044 core/libs/prx/libc/CMakeLists.txt
core/libs/tests/GuestMessageDestructorAbi.cpp
PR 6061 core/libs/prx/libc/CMakeLists.txt
PR 6222 core/libs/prx/libc/CMakeLists.txt
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6191786176 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6072#issuecomment-6191786176). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-15T12:14:12Z. --- <!-- pr-overlap --> 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. | Pull request | Shared files not compared | |---|---| | [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `core/libs/prx/libc/CMakeLists.txt` | | [PR 5668](https://www.github.com/boykopovar/AnyPS5/pull/5668) | `core/libs/prx/libc/CMakeLists.txt` | | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/prx/libc/CMakeLists.txt`<br>`core/libs/tests/GuestMessageDestructorAbi.cpp` | | [PR 6061](https://www.github.com/boykopovar/AnyPS5/pull/6061) | `core/libs/prx/libc/CMakeLists.txt` | | [PR 6222](https://www.github.com/boykopovar/AnyPS5/pull/6222) | `core/libs/prx/libc/CMakeLists.txt` |
adriadam10 commented 2026-10-16 22:06:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-16T22:06:34Z.


Checked the diff against std::exception::_Doraise and _Xout_of_range (same pattern, null guard included), full build and ctest on Linux (only the unrelated agc_driver_tessellation segfault on RADV). The new guest_message_destructor_{runtime,doraise}-* modes are MinGW-only, so the full Windows build is the gate; merging once it is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6225609625 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6072#issuecomment-6225609625). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-16T22:06:34Z. --- Checked the diff against `std::exception::_Doraise` and `_Xout_of_range` (same pattern, null guard included), full build and ctest on Linux (only the unrelated `agc_driver_tessellation` segfault on RADV). The new `guest_message_destructor_{runtime,doraise}-*` modes are MinGW-only, so the full Windows build is the gate; merging once it is green.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!6072
No description provided.