fix(libc): finish exit handlers after nested exit #5284

Merged
MarcZX10 merged 1 commit from upstream-pr/5284 into main 2026-10-14 02:50:18 +00:00
MarcZX10 commented 2026-10-13 16:29:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T16:29:47Z.


What

Fixes #5277. A nested guest exit() invoked by an exit handler now continues through the remaining guest exit handlers instead of waiting on the thread already running them. Calls from another thread still wait for the in-progress exit. Adds a child-process regression test that checks the remaining handler runs and the nested exit status wins.

The implementation and test commit retain Hussein Kadhim as author.

Tested

  • Debian 12, Linux x86_64, GCC 12.2: guest_nested_exit, guest_system_exit and guest_system_relaunch passed (3/3).
  • Conventions check and git diff --check passed.
  • The reported Windows failure was not locally rerun; no Windows local run.

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; silent stubs are listed under technical debt
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4846311731 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5284). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-13T16:29:47Z. --- ### What Fixes #5277. A nested guest `exit()` invoked by an exit handler now continues through the remaining guest exit handlers instead of waiting on the thread already running them. Calls from another thread still wait for the in-progress exit. Adds a child-process regression test that checks the remaining handler runs and the nested exit status wins. The implementation and test commit retain Hussein Kadhim as author. ### Tested - Debian 12, Linux x86_64, GCC 12.2: `guest_nested_exit`, `guest_system_exit` and `guest_system_relaunch` passed (3/3). - Conventions check and `git diff --check` passed. - The reported Windows failure was not locally rerun; no Windows local run. ### 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; silent stubs are listed under technical debt - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
likecrank-dotcom commented 2026-10-13 19:11:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by likecrank-dotcom on 2026-10-13T19:11:28Z.


Independent Windows validation by OpenAI Codex (AI-assisted; report authored by an AI):

  • Verified PR head 37ea3b651a249487790e1e231c9ce80fa5e7d568.
  • Built guest_system_exit_tests on Windows 11 Pro (WinLibs GCC 15.2.0, Ninja, CMake/CTest 4.4.4).
  • guest_system_exit, guest_system_relaunch, and guest_nested_exit passed (3/3); guest_nested_exit also passed ten additional consecutive runs.
  • tools/check_conventions.py and git diff --check passed.

This verifies the focused Windows regressions only; no console or commercial-title runtime was tested. No changes were made to the PR branch.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6153159726 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5284#issuecomment-6153159726). Originally posted by [likecrank-dotcom](https://github.com/likecrank-dotcom) on 2026-10-13T19:11:28Z. --- Independent Windows validation by OpenAI Codex (AI-assisted; report authored by an AI): - Verified PR head `37ea3b651a249487790e1e231c9ce80fa5e7d568`. - Built `guest_system_exit_tests` on Windows 11 Pro (WinLibs GCC 15.2.0, Ninja, CMake/CTest 4.4.4). - `guest_system_exit`, `guest_system_relaunch`, and `guest_nested_exit` passed (3/3); `guest_nested_exit` also passed ten additional consecutive runs. - `tools/check_conventions.py` and `git diff --check` passed. This verifies the focused Windows regressions only; no console or commercial-title runtime was tested. No changes were made to the PR branch.
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!5284
No description provided.