test(libkernel): throw through the guest runtime on macOS in the host standard error test #9654

Merged
rooklz merged 3 commits from upstream-pr/9654 into main 2026-10-27 05:20:20 +00:00
rooklz commented 2026-10-22 06:23:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by rooklz on 2026-10-22T06:23:43Z.


What

guest_host_standard_error fails on macOS hosts at the terminate check of its redirected child. On Linux the child's throw std::runtime_error("report kept") resolves to libc's __cxa_throw alias (GCC_GLOBAL_ALIAS in prx/libc/src/exception/Exports.cpp), so the guest runtime in prx/libc/src/exception/Runtime.cpp writes the what(): report kept line the test looks for. GCC_GLOBAL_ALIAS expands to nothing outside Linux, so on macOS the throw goes straight to the host's libc++abi, which prints its own line and the guest runtime never takes part.

On macOS the child now throws through the guest runtime itself: it allocates the exception with __cxa_allocate_exception_nid_postfix and raises it with __cxa_throw_nid_postfix, which is what the Linux alias does for it. The expected text is unchanged on every host, so the test checks AnyPS5's terminate report on macOS too. This is the construction #8658 uses for the same test; @jotitadev pointed it out in review of the first version of this PR, which instead matched libc++abi's own message and so checked the host runtime rather than ours.

Tested

  • macOS 26.2, Apple M5, Apple clang 21, x86-64 under Rosetta 2, on @mugurc's ci/macos-series-2 at 53db0badb with #7524, the code of #7937 and the libSceSsl change of #7332, plus 715fe9ca26, c03168fb47 and fb0b5ca919 from main cherry-picked so the file's newer sections compile. The two terminate runs (dup2 and freopen) pass: the host pipe receives host, the [libc] unhandled exception line, terminate called after throwing an instance of 'std::runtime_error' and what(): report kept, and the probe file keeps only guest. Without this change those runs fail at the what() check. The file's later guest-stdio section (from c03168fb47) does not complete on that tree, whose base predates it, so I could not run the whole binary to the end there; @jotitadev reports the same construction passing 3 of 3 on #8658 at fbb251c25 on an M2 Max.
  • Apple M1 Pro, macOS 27.0.1, x86-64 under Rosetta 2, by @maximilianfv on the macOS series at 27e968974 with other open macOS fixes, toggling only this PR: without it guest_host_standard_error aborts at the what(): report kept check (GuestHostStandardError.cpp:104); with it the test passes to the end, the guest-stdio section after the terminate runs included, which my M5 tree could not reach.
  • Linux (Ubuntu 24.04, GCC, Release, hosted runner): guest_host_standard_error passes on this head in a verify run on my fork. The throw line there is unchanged.
  • check_conventions.py passes. pr_overlap.py reports no conflicting lines; #6044 shares the file but conflicts with main. #8658 edits the same hunk with the same code, so whichever lands first, the other's hunk becomes a no-op.

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
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4963070237 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9654). Originally posted by [rooklz](https://github.com/rooklz) on 2026-10-22T06:23:43Z. --- ### What `guest_host_standard_error` fails on macOS hosts at the terminate check of its redirected child. On Linux the child's `throw std::runtime_error("report kept")` resolves to libc's `__cxa_throw` alias (`GCC_GLOBAL_ALIAS` in `prx/libc/src/exception/Exports.cpp`), so the guest runtime in `prx/libc/src/exception/Runtime.cpp` writes the ` what(): report kept` line the test looks for. `GCC_GLOBAL_ALIAS` expands to nothing outside Linux, so on macOS the throw goes straight to the host's libc++abi, which prints its own line and the guest runtime never takes part. On macOS the child now throws through the guest runtime itself: it allocates the exception with `__cxa_allocate_exception_nid_postfix` and raises it with `__cxa_throw_nid_postfix`, which is what the Linux alias does for it. The expected text is unchanged on every host, so the test checks AnyPS5's terminate report on macOS too. This is the construction #8658 uses for the same test; @jotitadev pointed it out in review of the first version of this PR, which instead matched libc++abi's own message and so checked the host runtime rather than ours. ### Tested - macOS 26.2, Apple M5, Apple clang 21, x86-64 under Rosetta 2, on @mugurc's `ci/macos-series-2` at `53db0badb` with #7524, the code of #7937 and the libSceSsl change of #7332, plus `715fe9ca26`, `c03168fb47` and `fb0b5ca919` from `main` cherry-picked so the file's newer sections compile. The two terminate runs (dup2 and freopen) pass: the host pipe receives `host`, the `[libc] unhandled exception` line, `terminate called after throwing an instance of 'std::runtime_error'` and ` what(): report kept`, and the probe file keeps only `guest`. Without this change those runs fail at the `what()` check. The file's later guest-stdio section (from `c03168fb47`) does not complete on that tree, whose base predates it, so I could not run the whole binary to the end there; @jotitadev reports the same construction passing 3 of 3 on #8658 at `fbb251c25` on an M2 Max. - Apple M1 Pro, macOS 27.0.1, x86-64 under Rosetta 2, by @maximilianfv on the macOS series at `27e968974` with other open macOS fixes, toggling only this PR: without it `guest_host_standard_error` aborts at the ` what(): report kept` check (`GuestHostStandardError.cpp:104`); with it the test passes to the end, the guest-stdio section after the terminate runs included, which my M5 tree could not reach. - Linux (Ubuntu 24.04, GCC, Release, hosted runner): `guest_host_standard_error` passes on this head in a [verify run on my fork](https://github.com/rooklz/AnyPS5/actions/runs/39775492411). The throw line there is unchanged. - `check_conventions.py` passes. `pr_overlap.py` reports no conflicting lines; #6044 shares the file but conflicts with `main`. #8658 edits the same hunk with the same code, so whichever lands first, the other's hunk becomes a no-op. <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/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 - [x] Generic behaviour, not specific to one title - [x] Depends on: none <!-- #PR, or none --> - [x] Fixes: none <!-- issue it closes as Fixes #N, or none --> - [x] Unblocks: none <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> - [x] GPUs tested: n/a <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> - [x] AI-assisted: yes <!-- yes / no -->
MarcZX10 commented 2026-10-22 09:13:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T09:13:30Z.

Review: CHANGES_REQUESTED


The macOS-specific expected line matches the libc++abi output documented in the PR, and Linux/Windows retain their existing assertion. Exact-head diff-check and conventions pass. Platform test jobs are skipped here, so the reported three macOS runs are the available runtime evidence; I could not reproduce them locally. I found no issue with the conditional assertion.\n\nTwo process points remain. First, the PR changes GuestHostStandardError.cpp, which open #8658 also modifies; a merge-tree combines the separate hunks cleanly, but please coordinate the merge order with that author and record that this fix is part of the macOS test support.

I’ve noticed that holding this PR because of #5239 isn’t necessary. It’s fine for PRs to keep coming in; they’ll be handled in due course. Please disregard my earlier request to hold or defer it.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5611850928 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9654#pullrequestreview-5611850928). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T09:13:30Z. **Review:** CHANGES_REQUESTED --- The macOS-specific expected line matches the libc++abi output documented in the PR, and Linux/Windows retain their existing assertion. Exact-head diff-check and conventions pass. Platform test jobs are skipped here, so the reported three macOS runs are the available runtime evidence; I could not reproduce them locally. I found no issue with the conditional assertion.\n\nTwo process points remain. First, the PR changes `GuestHostStandardError.cpp`, which open #8658 also modifies; a merge-tree combines the separate hunks cleanly, but please coordinate the merge order with that author and record that this fix is part of the macOS test support. I’ve noticed that holding this PR because of #5239 isn’t necessary. It’s fine for PRs to keep coming in; they’ll be handled in due course. Please disregard my earlier request to hold or defer it.
jotitadev commented 2026-10-22 10:57:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-22T10:57:21Z.

Review: COMMENTED


With this change, the test on macOS no longer checks AnyPS5's terminate report. It checks the host C++ runtime's report. Head aa9e11f9a.

On Linux, throw in the child resolves to libc's __cxa_throw alias (GCC_GLOBAL_ALIAS(__cxa_throw, __cxa_throw_nid_postfix) in prx/libc/src/exception/Exports.cpp). The what(): report kept line is written by AnyPS5's terminate in prx/libc/src/exception/Runtime.cpp, not by libstdc++. GCC_GLOBAL_ALIAS expands to nothing outside Linux (specifics/gcc/SymbolAlias.hpp). So on macOS the throw goes straight to libc++abi, and the libc++abi line this PR expects is the host runtime's own report. That report goes to host fd 2 whatever the guest did with its descriptor 2, so the check passes without the guest runtime taking part.

I checked this on Apple M2 Max, macOS 27.2, Apple clang 21, x86-64 under Rosetta 2, on #8658 @ fbb251c25. I printed terminated.host in the test:

  • This PR's file: host\nlibc++abi: terminating due to uncaught exception of type std::runtime_error: report kept\n. Passes 3/3.
  • #8658's version of the file, which calls __cxa_allocate_exception_nid_postfix/__cxa_throw_nid_postfix directly on macOS and keeps the original assertion: host\n[libc] unhandled exception 'St13runtime_error' thrown from 0x…\nterminate called after throwing an instance of 'std::runtime_error'\n what(): report kept\n. Passes 3/3.

Both pass. Only #8658's version checks on macOS the same thing the test checks on Linux. If this PR goes in first, it could throw through __cxa_throw_nid_postfix on macOS, as #8658 does, rather than change the expected text.

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5613084142 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9654#pullrequestreview-5613084142). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-22T10:57:21Z. **Review:** COMMENTED --- With this change, the test on macOS no longer checks AnyPS5's terminate report. It checks the host C++ runtime's report. Head `aa9e11f9a`. On Linux, `throw` in the child resolves to libc's `__cxa_throw` alias (`GCC_GLOBAL_ALIAS(__cxa_throw, __cxa_throw_nid_postfix)` in `prx/libc/src/exception/Exports.cpp`). The ` what(): report kept` line is written by AnyPS5's terminate in `prx/libc/src/exception/Runtime.cpp`, not by libstdc++. `GCC_GLOBAL_ALIAS` expands to nothing outside Linux (`specifics/gcc/SymbolAlias.hpp`). So on macOS the throw goes straight to libc++abi, and the libc++abi line this PR expects is the host runtime's own report. That report goes to host fd 2 whatever the guest did with its descriptor 2, so the check passes without the guest runtime taking part. I checked this on Apple M2 Max, macOS 27.2, Apple clang 21, x86-64 under Rosetta 2, on #8658 @ `fbb251c25`. I printed `terminated.host` in the test: - This PR's file: `host\nlibc++abi: terminating due to uncaught exception of type std::runtime_error: report kept\n`. Passes 3/3. - #8658's version of the file, which calls `__cxa_allocate_exception_nid_postfix`/`__cxa_throw_nid_postfix` directly on macOS and keeps the original assertion: `host\n[libc] unhandled exception 'St13runtime_error' thrown from 0x…\nterminate called after throwing an instance of 'std::runtime_error'\n what(): report kept\n`. Passes 3/3. Both pass. Only #8658's version checks on macOS the same thing the test checks on Linux. If this PR goes in first, it could throw through `__cxa_throw_nid_postfix` on macOS, as #8658 does, rather than change the expected text. Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
rooklz commented 2026-10-22 12:04:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by rooklz on 2026-10-22T12:04:16Z.


@jotitadev you're right, that checked libc++abi rather than our runtime. Head 209a55a979 now throws through __cxa_allocate_exception_nid_postfix and __cxa_throw_nid_postfix on macOS, the construction from #8658, and the expected text is the same on every host. The description has the details of what I could run: the two terminate runs pass on my tree and capture the guest report ([libc] unhandled exception, terminate called after throwing an instance of 'std::runtime_error', what(): report kept), and without the change they fail at the what() check. The file's later guest-stdio section from c03168fb47 doesn't complete on my older tree, so I'm citing your 3 of 3 on #8658 for the whole binary rather than claiming it myself.

@MarcZX10 on merge order with #8658: the macOS hunk is now the same code, so whichever lands first the other's hunk is a no-op. On the #5239 direction: this is a test fix for the macOS work on #1, not a title; I'm fine holding it or closing it in favour of #8658 if a maintainer prefers.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6340280337 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9654#issuecomment-6340280337). Originally posted by [rooklz](https://github.com/rooklz) on 2026-10-22T12:04:16Z. --- @jotitadev you're right, that checked libc++abi rather than our runtime. Head `209a55a979` now throws through `__cxa_allocate_exception_nid_postfix` and `__cxa_throw_nid_postfix` on macOS, the construction from #8658, and the expected text is the same on every host. The description has the details of what I could run: the two terminate runs pass on my tree and capture the guest report (`[libc] unhandled exception`, `terminate called after throwing an instance of 'std::runtime_error'`, ` what(): report kept`), and without the change they fail at the `what()` check. The file's later guest-stdio section from `c03168fb47` doesn't complete on my older tree, so I'm citing your 3 of 3 on #8658 for the whole binary rather than claiming it myself. @MarcZX10 on merge order with #8658: the macOS hunk is now the same code, so whichever lands first the other's hunk is a no-op. On the #5239 direction: this is a test fix for the macOS work on #1, not a title; I'm fine holding it or closing it in favour of #8658 if a maintainer prefers.
MarcZX10 commented 2026-10-22 12:41:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T12:41:56Z.

Review: APPROVED


The current head now routes the macOS test throw through AnyPS5's guest exception runtime, matching the Linux path and preserving the original guest terminate-report assertion. This addresses the prior concern that the test was only checking libc++abi's host message. I fetched exact head 209a55a9; git diff --check upstream/main...HEAD and python3 tools/check_conventions.py --base upstream/main --head HEAD both pass. The author reports focused macOS runs passing, and #8658's author confirmed the same hunk and agreed whichever PR lands first makes the other's hunk a no-op. I did not run the C++ test locally; hosted product test jobs are skipped. I found no remaining code or coordination blocker and approve.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5614283978 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9654#pullrequestreview-5614283978). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T12:41:56Z. **Review:** APPROVED --- The current head now routes the macOS test throw through AnyPS5's guest exception runtime, matching the Linux path and preserving the original guest terminate-report assertion. This addresses the prior concern that the test was only checking libc++abi's host message. I fetched exact head `209a55a9`; `git diff --check upstream/main...HEAD` and `python3 tools/check_conventions.py --base upstream/main --head HEAD` both pass. The author reports focused macOS runs passing, and #8658's author confirmed the same hunk and agreed whichever PR lands first makes the other's hunk a no-op. I did not run the C++ test locally; hosted product test jobs are skipped. I found no remaining code or coordination blocker and approve.
rooklz commented 2026-10-22 13:34:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by rooklz on 2026-10-22T13:34:34Z.


Rebased onto current main (8b3e39832a): head f8ca673040, same diff.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6342080231 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9654#issuecomment-6342080231). Originally posted by [rooklz](https://github.com/rooklz) on 2026-10-22T13:34:34Z. --- Rebased onto current `main` (`8b3e39832a`): head `f8ca673040`, same diff.
jotitadev commented 2026-10-22 23:38:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-22T23:38:20Z.

Review: COMMENTED


Follow-up to my earlier review: with f8ca673040 the macOS path goes through the guest runtime again, so the original what(): report kept assertion is checking AnyPS5's terminate report, not libc++abi's.

main does not link on macOS, so I ran it on the macOS port branch (#8658 @ f48446abb), whose GuestHostStandardError.cpp is identical to this head apart from one comment line. Apple M2 Max, macOS 27.2, x86_64 under Rosetta: ctest -R guest_host_standard_error --repeat until-fail:3 passes 3/3.

Written with AI assistance (Claude Code). I ran the test above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5622224809 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9654#pullrequestreview-5622224809). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-22T23:38:20Z. **Review:** COMMENTED --- Follow-up to my earlier review: with `f8ca673040` the macOS path goes through the guest runtime again, so the original `what(): report kept` assertion is checking AnyPS5's terminate report, not libc++abi's. `main` does not link on macOS, so I ran it on the macOS port branch (#8658 @ `f48446abb`), whose `GuestHostStandardError.cpp` is identical to this head apart from one comment line. Apple M2 Max, macOS 27.2, x86_64 under Rosetta: `ctest -R guest_host_standard_error --repeat until-fail:3` passes 3/3. Written with AI assistance (Claude Code). I ran the test above on my machine.
maximilianfv commented 2026-10-26 22:46:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by maximilianfv on 2026-10-26T22:46:29Z.

Review: APPROVED


Approving at 2a7220275c: the macOS throw still goes through the guest runtime, the test passes, and public_headers passes now that the local declarations are gone. The two body fixes below are not blockers.

Tested on Apple M1 Pro, macOS 27.0.1 (x86_64 build under Rosetta 2)

Applied at 2a7220275c to mugurc's macOS series (27e968974) merged with main at 2742004ed2, with other open macOS fixes, then toggled only this PR. Each side ran 3 times, and the "with" side ran another 20 times with --repeat until-fail:20.

guest_host_standard_error public_headers
Without this PR 3 of 3 abort at the what(): report kept check (GuestHostStandardError.cpp:106 at this head). The child's host pipe holds host\nlibc++abi: terminating due to uncaught exception of type std::runtime_error: report kept\n Passed 3 of 3
With this PR Passed 3 of 3, plus 20 of 20 in the repeat run. The host pipe of the dup2 run holds host, [libc] unhandled exception 'St13runtime_error' thrown from 0x…, terminate called after throwing an instance of 'std::runtime_error' and what(): report kept Passed 3 of 3

At this head the macOS branch compiles against the declarations in exceptions/Runtime.hpp, which come in through prx/libc/include/Api.hpp. The new code adds no warnings; the 7 warnings in that compile are the existing C-linkage warnings from General.hpp and Api.hpp. @oneandonlydean's public_headers finding is fixed: the audit reported the two duplicates at 0bc464eb0e and passes at 2a7220275c.

Notes

  1. PR body, Tested, Linux bullet. It says the test "passes on this head" and links run 39775492411, but that run is on 81b9dba21d from 2026-10-22, which is not one of this PR's commits. The build jobs at 2a7220275c are skipping. The evidence for this head is @rooklz's Docker run in the comment of 2026-10-26, so the bullet should cite that run instead.
  2. PR body, overlap note. #8658 and #6044 are both closed, so "whichever lands first" no longer applies. Only this PR among the open ones touches GuestHostStandardError.cpp. Since the construction comes from #8658, crediting its author iamthehimansh would be fair.
  3. Question, GuestHostStandardError.cpp:70. The explicit guest throw depends on __APPLE__, while the alias it replaces is missing whenever the host is not __linux__ (specifics/gcc/SymbolAlias.hpp). The test is registered for every UNIX host. #ifndef __linux__ would match the alias condition, if a non-Linux, non-Apple UNIX host is meant to build these tests.
  4. Question, the gap behind the test. On macOS, any plain throw in host-compiled code linked against libc still goes to libc++abi and skips the guest terminate report, because GCC_GLOBAL_ALIAS is Linux-only and the asm shims in prx/libc/src/exception/Exports.cpp are _WIN32-only. This test now goes around that gap, and docs/dev/debt/libc.md does not mention it. A short debt entry, here or in a follow-up, would keep it visible.
  5. Nit, GuestHostStandardError.cpp:20. <typeinfo> already comes in through exceptions/Runtime.hpp. An unconditional #include <new> next to the other standard headers would remove the #elif branch.

AI-assisted: yes (Claude Code applied the PR, ran the tests, read the code and wrote this review).

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5660121486 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9654#pullrequestreview-5660121486). Originally posted by [maximilianfv](https://github.com/maximilianfv) on 2026-10-26T22:46:29Z. **Review:** APPROVED --- Approving at `2a7220275c`: the macOS throw still goes through the guest runtime, the test passes, and `public_headers` passes now that the local declarations are gone. The two body fixes below are not blockers. ### Tested on Apple M1 Pro, macOS 27.0.1 (x86_64 build under Rosetta 2) Applied at `2a7220275c` to mugurc's macOS series (`27e968974`) merged with `main` at `2742004ed2`, with other open macOS fixes, then toggled only this PR. Each side ran 3 times, and the "with" side ran another 20 times with `--repeat until-fail:20`. | | `guest_host_standard_error` | `public_headers` | |---|---|---| | Without this PR | 3 of 3 abort at the ` what(): report kept` check (`GuestHostStandardError.cpp:106` at this head). The child's host pipe holds `host\nlibc++abi: terminating due to uncaught exception of type std::runtime_error: report kept\n` | Passed 3 of 3 | | With this PR | Passed 3 of 3, plus 20 of 20 in the repeat run. The host pipe of the dup2 run holds `host`, `[libc] unhandled exception 'St13runtime_error' thrown from 0x…`, `terminate called after throwing an instance of 'std::runtime_error'` and ` what(): report kept` | Passed 3 of 3 | At this head the macOS branch compiles against the declarations in `exceptions/Runtime.hpp`, which come in through `prx/libc/include/Api.hpp`. The new code adds no warnings; the 7 warnings in that compile are the existing C-linkage warnings from `General.hpp` and `Api.hpp`. @oneandonlydean's `public_headers` finding is fixed: the audit reported the two duplicates at `0bc464eb0e` and passes at `2a7220275c`. ### Notes 1. **PR body, Tested, Linux bullet.** It says the test "passes on this head" and links [run 39775492411](https://github.com/rooklz/AnyPS5/actions/runs/39775492411), but that run is on `81b9dba21d` from 2026-10-22, which is not one of this PR's commits. The build jobs at `2a7220275c` are `skipping`. The evidence for this head is @rooklz's Docker run in the comment of 2026-10-26, so the bullet should cite that run instead. 2. **PR body, overlap note.** #8658 and #6044 are both closed, so "whichever lands first" no longer applies. Only this PR among the open ones touches `GuestHostStandardError.cpp`. Since the construction comes from #8658, crediting its author `iamthehimansh` would be fair. 3. **Question, `GuestHostStandardError.cpp:70`.** The explicit guest throw depends on `__APPLE__`, while the alias it replaces is missing whenever the host is not `__linux__` (`specifics/gcc/SymbolAlias.hpp`). The test is registered for every `UNIX` host. `#ifndef __linux__` would match the alias condition, if a non-Linux, non-Apple UNIX host is meant to build these tests. 4. **Question, the gap behind the test.** On macOS, any plain `throw` in host-compiled code linked against libc still goes to libc++abi and skips the guest terminate report, because `GCC_GLOBAL_ALIAS` is Linux-only and the `asm` shims in `prx/libc/src/exception/Exports.cpp` are `_WIN32`-only. This test now goes around that gap, and `docs/dev/debt/libc.md` does not mention it. A short debt entry, here or in a follow-up, would keep it visible. 5. **Nit, `GuestHostStandardError.cpp:20`.** `<typeinfo>` already comes in through `exceptions/Runtime.hpp`. An unconditional `#include <new>` next to the other standard headers would remove the `#elif` branch. AI-assisted: yes (Claude Code applied the PR, ran the tests, read the code and wrote this review).
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!9654
No description provided.