fix(libkernel): leave other threads' signal masks alone when a thread exits through scePthreadExit #12897

Merged
AdnanKhan-ak47 merged 1 commit from upstream-pr/12897 into main 2026-10-30 05:30:49 +00:00
AdnanKhan-ak47 commented 2026-10-29 13:45:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by AdnanKhan-ak47 on 2026-10-29T13:45:24Z.


What

On macOS, a thread that exits through scePthreadExit changes the signal mask of the other threads, so every thread created after it blocks SIGUSR1, SIGSEGV, SIGBUS and most other signals. guest_pthread_create_suspended fails because of it ("the handler did not run on the thread once it was resumed").

  • scePthreadExit leaves the thread by longjmping to the setjmp(exitJump) in ThreadEntry (Pthread/src/Thread.cpp).
  • On Darwin, setjmp saves and longjmp restores the signal mask through sigprocmask. The buffer is filled while the thread still has the all-blocked mask that scePthreadCreate sets around pthread_create, so every exit re-applies that mask.
  • On Darwin, that sigprocmask call also changed the mask the main thread reads back. In the test the main thread then reads 0xfffefeff, and scePthreadCreate copies it into every later thread. The raised SIGUSR1 stays pending forever, and the SIGSEGV/SIGBUS handlers the write watch installs stop seeing faults on those threads.
  • glibc's setjmp/longjmp do not save the mask, so Linux was not affected.

The pair becomes _setjmp/_longjmp, the POSIX variants that leave the mask alone. The exit path only unwinds the thread's frames. The block is already #ifndef _WIN32, so the change is 2 lines with no new #ifdef. Diagnosis and the macOS run are in #1.

#9938 moves this setjmp into RunGuestThread but keeps it, so the bug remains with it. Whichever lands second has a two-line rebase.

Tested

macOS. Apple M4, macOS 27.2, Apple clang 21.0.0, x86-64 Release under Rosetta 2, Vulkan SDK 1.4.363.0. main f88c86bf6c plus the macOS PR set that libkernel needs to build (#10552, #11249, #11447, #10669, #12076, #7631, #7804, #11554, #11437, #4630), BUILD_TESTING=ON.

  • guest_pthread_create_suspended fails every run without the change, and passes 20/20 with it.
  • Full ctest -j8 (2818 tests) with and without it: the only differences are guest_pthread_create_suspended, now passing, and one agc_driver_image_table timeout that also passes alone without the change. Nothing new fails.

Linux. Arch Linux x86-64 (Ryzen 7 3700X, GCC 16.2.1), Release, this branch 33afa6a464 on main edf6804cf5: the 121 thread, signal and exception tests (ctest -R "pthread|thread|signal|exception|setjmp") pass, as they do on main f88c86bf6c. glibc's setjmp does not save the signal mask, so _setjmp/_longjmp behave the same there and nothing changes on Linux.

tools/check_conventions.py --base origin/main passes. tools/pr_overlap.py lists 10 open PRs touching Thread.cpp; only #9938 changes these lines, and #12682 merges cleanly with this branch.

Merge order with #9938 (agreed with @BorchBe99 in https://github.com/boykopovar/AnyPS5/pull/9938#issuecomment-6510541480, who added this PR to #9938's Depends on): this PR first, then #9938. AdnanKhan-ak47:update/9938-with-12897 (a52db41d53) is #9938's head 36a6b5c6c7 with this PR merged in. The one conflict is #9938's moved native setjmp(exitJump) in RunGuestThread, which becomes _setjmp; the _longjmp in scePthreadExit merges cleanly. On POSIX hosts both #9938's native-stack and caller-stack threads go through RunGuestThread, so that one line covers both; Windows uses the guest jump buffer, which only touches libkernel's emulated mask. On macOS (the PR set from #1 plus that branch), guest_pthread_create_suspended passes 20/20, and guest_pthread_cancel and guest_pthread_cancel_recovery pass. With both lines put back to setjmp/std::longjmp, guest_pthread_create_suspended fails. guest_pthread_provided_stack is built only on Windows and Linux, and the Linux run of that branch is still to do. If #9938 lands first instead, I rebase this PR onto it with the same one-line change.

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; merge order with #9938: this PR first, agreed with @BorchBe99; #9938 lists this PR in Depends on
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5069157654 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12897). Originally posted by [AdnanKhan-ak47](https://github.com/AdnanKhan-ak47) on 2026-10-29T13:45:24Z. --- ### What On macOS, a thread that exits through `scePthreadExit` changes the signal mask of the other threads, so every thread created after it blocks `SIGUSR1`, `SIGSEGV`, `SIGBUS` and most other signals. `guest_pthread_create_suspended` fails because of it ("the handler did not run on the thread once it was resumed"). - `scePthreadExit` leaves the thread by `longjmp`ing to the `setjmp(exitJump)` in `ThreadEntry` (`Pthread/src/Thread.cpp`). - On Darwin, `setjmp` saves and `longjmp` restores the signal mask through `sigprocmask`. The buffer is filled while the thread still has the all-blocked mask that `scePthreadCreate` sets around `pthread_create`, so every exit re-applies that mask. - On Darwin, that `sigprocmask` call also changed the mask the main thread reads back. In the test the main thread then reads `0xfffefeff`, and `scePthreadCreate` copies it into every later thread. The raised `SIGUSR1` stays pending forever, and the `SIGSEGV`/`SIGBUS` handlers the write watch installs stop seeing faults on those threads. - glibc's `setjmp`/`longjmp` do not save the mask, so Linux was not affected. The pair becomes `_setjmp`/`_longjmp`, the POSIX variants that leave the mask alone. The exit path only unwinds the thread's frames. The block is already `#ifndef _WIN32`, so the change is 2 lines with no new `#ifdef`. Diagnosis and the macOS run are in [#1](https://github.com/boykopovar/AnyPS5/issues/1#issuecomment-6490747698). #9938 moves this `setjmp` into `RunGuestThread` but keeps it, so the bug remains with it. Whichever lands second has a two-line rebase. ### Tested **macOS.** Apple M4, macOS 27.2, Apple clang 21.0.0, x86-64 Release under Rosetta 2, Vulkan SDK 1.4.363.0. `main` `f88c86bf6c` plus the macOS PR set that `libkernel` needs to build (#10552, #11249, #11447, #10669, #12076, #7631, #7804, #11554, #11437, #4630), `BUILD_TESTING=ON`. - `guest_pthread_create_suspended` fails every run without the change, and passes 20/20 with it. - Full `ctest -j8` (2818 tests) with and without it: the only differences are `guest_pthread_create_suspended`, now passing, and one `agc_driver_image_table` timeout that also passes alone without the change. Nothing new fails. **Linux.** Arch Linux x86-64 (Ryzen 7 3700X, GCC 16.2.1), Release, this branch `33afa6a464` on `main` `edf6804cf5`: the 121 thread, signal and exception tests (`ctest -R "pthread|thread|signal|exception|setjmp"`) pass, as they do on `main` `f88c86bf6c`. glibc's `setjmp` does not save the signal mask, so `_setjmp`/`_longjmp` behave the same there and nothing changes on Linux. `tools/check_conventions.py --base origin/main` passes. `tools/pr_overlap.py` lists 10 open PRs touching `Thread.cpp`; only #9938 changes these lines, and #12682 merges cleanly with this branch. **Merge order with #9938** (agreed with @BorchBe99 in https://github.com/boykopovar/AnyPS5/pull/9938#issuecomment-6510541480, who added this PR to #9938's `Depends on`): this PR first, then #9938. `AdnanKhan-ak47:update/9938-with-12897` (`a52db41d53`) is #9938's head `36a6b5c6c7` with this PR merged in. The one conflict is #9938's moved native `setjmp(exitJump)` in `RunGuestThread`, which becomes `_setjmp`; the `_longjmp` in `scePthreadExit` merges cleanly. On POSIX hosts both #9938's native-stack and caller-stack threads go through `RunGuestThread`, so that one line covers both; Windows uses the guest jump buffer, which only touches libkernel's emulated mask. On macOS (the PR set from #1 plus that branch), `guest_pthread_create_suspended` passes 20/20, and `guest_pthread_cancel` and `guest_pthread_cancel_recovery` pass. With both lines put back to `setjmp`/`std::longjmp`, `guest_pthread_create_suspended` fails. `guest_pthread_provided_stack` is built only on Windows and Linux, and the Linux run of that branch is still to do. If #9938 lands first instead, I rebase this PR onto it with the same one-line change. ### 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; merge order with #9938: this PR first, agreed with @BorchBe99; #9938 lists this PR in `Depends on` - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
MarcZX10 commented 2026-10-29 13:52:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T13:52:29Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The implementation matches the reported Darwin signal-mask issue, but the branch conflicts with open PR #9938 in Thread.cpp and the required landing order is not declared.

What I ran

  • Reviewed exact head 33afa6a4648f9e7860413b1116f1aa6e61828486 against current main b0465557fdf9daa302392cbd2e2d799fc59bbf79.
  • Current-main merge preview: clean, tree 5eb8668f646198730dee2c612618f989145deec3.
  • Pairwise preview with open #9938 head 36a6b5c6c730c24a2024cd3f43a3ad2b46523adf: conflicts in core/libs/prx/libkernel/Pthread/src/Thread.cpp.
  • Environment: Debian 12.2, Git and Python 3. No C++ build or test was run locally.
  • Commands:
git merge-tree --write-tree upstream/main upstream/pr-12897
git merge-tree --write-tree upstream/pr-9938 upstream/pr-12897
python3 tools/check_conventions.py --base upstream/main --head upstream/pr-12897
git diff --check upstream/main...upstream/pr-12897
gh pr checks 12897 --repo boykopovar/AnyPS5

Results

Check Result
Current-main merge preview Clean; tree 5eb8668f646198730dee2c612618f989145deec3
Pairwise merge preview with #9938 Conflicts in Thread.cpp; tree 623d540a7e73f182c77884c37408ef70a3f217a4
Conventions Passed
Diff check Passed; no output
Hosted policy checks Pending
Local C++ build/tests Not run
Unedited command output
5eb8668f646198730dee2c612618f989145deec3
All conventions checks passed.
623d540a7e73f182c77884c37408ef70a3f217a4
100644 71680fca259b9296f8090651ac468fa528a9a9b4 1	core/libs/prx/libkernel/Pthread/src/Thread.cpp
100644 35d49ae5638bb4961d56452e66c1ce2def3c854e 2	core/libs/prx/libkernel/Pthread/src/Thread.cpp
100644 c1cf51e20cea2c0eee8ca715beba07f32f06cead 3	core/libs/prx/libkernel/Pthread/src/Thread.cpp
Auto-merging core/libs/prx/libkernel/CMakeLists.txt
Auto-merging core/libs/prx/libkernel/Pthread/Posix/Attr.cpp
Auto-merging core/libs/prx/libkernel/Pthread/include/Pthread.hpp
Auto-merging core/libs/prx/libkernel/Pthread/src/Attr.cpp
Auto-merging core/libs/prx/libkernel/Pthread/src/Thread.cpp
CONFLICT (content): Merge conflict in core/libs/prx/libkernel/Pthread/src/Thread.cpp
conventions	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/40884870787/job/123485764719
eligibility	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/40884870702/job/123485761888
intake	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/40884870816/job/123485764701
labels	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/40884870742/job/123485764529
report	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/40884870802/job/123485762047

Negative control

Not applicable: the blocker is unresolved branch integration order, not a behavioral assertion.

Findings

Blocking

The PR body says #9938 also changes this setjmp path and that whichever lands second needs a rebase, but the checklist says Depends on: none. Both PRs are open, and a current pairwise merge preview conflicts in Thread.cpp. CONTRIBUTING.md requires the authors to agree which one lands first and record the dependency/order. Please coordinate with #9938's author and update the checklist to reflect the agreed sequence. If #9938 lands first, rerun the signal-mask regression on the rebased head; if this PR lands first, ask #9938's author to preserve the _setjmp/_longjmp change and rerun the caller-stack tests.

Non-blocking

The two-line change is consistent with the stated macOS setjmp signal-mask issue; the author reports a 20/20 macOS regression run and Linux thread tests. Those are author-reported results, not runs performed here.

Sources

Not verified

I did not run the focused C++ test or build locally. Hosted checks were pending. The macOS and Linux test results above are reported by the author; I did not independently reproduce them.

To get this to a good state

Agree with #9938's author on an order, record it in the dependency checklist, and rerun the affected focused tests on the resulting head. I will repeat the merge and convention checks on that head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5698825057 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12897#pullrequestreview-5698825057). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T13:52:29Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The implementation matches the reported Darwin signal-mask issue, but the branch conflicts with open PR #9938 in `Thread.cpp` and the required landing order is not declared. ## What I ran - Reviewed exact head `33afa6a4648f9e7860413b1116f1aa6e61828486` against current `main` `b0465557fdf9daa302392cbd2e2d799fc59bbf79`. - Current-main merge preview: clean, tree `5eb8668f646198730dee2c612618f989145deec3`. - Pairwise preview with open #9938 head `36a6b5c6c730c24a2024cd3f43a3ad2b46523adf`: conflicts in `core/libs/prx/libkernel/Pthread/src/Thread.cpp`. - Environment: Debian 12.2, Git and Python 3. No C++ build or test was run locally. - Commands: ```sh git merge-tree --write-tree upstream/main upstream/pr-12897 git merge-tree --write-tree upstream/pr-9938 upstream/pr-12897 python3 tools/check_conventions.py --base upstream/main --head upstream/pr-12897 git diff --check upstream/main...upstream/pr-12897 gh pr checks 12897 --repo boykopovar/AnyPS5 ``` ## Results | Check | Result | |---|---| | Current-main merge preview | Clean; tree `5eb8668f646198730dee2c612618f989145deec3` | | Pairwise merge preview with #9938 | Conflicts in `Thread.cpp`; tree `623d540a7e73f182c77884c37408ef70a3f217a4` | | Conventions | Passed | | Diff check | Passed; no output | | Hosted policy checks | Pending | | Local C++ build/tests | Not run | <details> <summary>Unedited command output</summary> ```text 5eb8668f646198730dee2c612618f989145deec3 All conventions checks passed. 623d540a7e73f182c77884c37408ef70a3f217a4 100644 71680fca259b9296f8090651ac468fa528a9a9b4 1 core/libs/prx/libkernel/Pthread/src/Thread.cpp 100644 35d49ae5638bb4961d56452e66c1ce2def3c854e 2 core/libs/prx/libkernel/Pthread/src/Thread.cpp 100644 c1cf51e20cea2c0eee8ca715beba07f32f06cead 3 core/libs/prx/libkernel/Pthread/src/Thread.cpp Auto-merging core/libs/prx/libkernel/CMakeLists.txt Auto-merging core/libs/prx/libkernel/Pthread/Posix/Attr.cpp Auto-merging core/libs/prx/libkernel/Pthread/include/Pthread.hpp Auto-merging core/libs/prx/libkernel/Pthread/src/Attr.cpp Auto-merging core/libs/prx/libkernel/Pthread/src/Thread.cpp CONFLICT (content): Merge conflict in core/libs/prx/libkernel/Pthread/src/Thread.cpp conventions pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/40884870787/job/123485764719 eligibility pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/40884870702/job/123485761888 intake pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/40884870816/job/123485764701 labels pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/40884870742/job/123485764529 report pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/40884870802/job/123485762047 ``` </details> ## Negative control Not applicable: the blocker is unresolved branch integration order, not a behavioral assertion. ## Findings ### Blocking The PR body says #9938 also changes this `setjmp` path and that whichever lands second needs a rebase, but the checklist says `Depends on: none`. Both PRs are open, and a current pairwise merge preview conflicts in `Thread.cpp`. CONTRIBUTING.md requires the authors to agree which one lands first and record the dependency/order. Please coordinate with #9938's author and update the checklist to reflect the agreed sequence. If #9938 lands first, rerun the signal-mask regression on the rebased head; if this PR lands first, ask #9938's author to preserve the `_setjmp`/`_longjmp` change and rerun the caller-stack tests. ### Non-blocking The two-line change is consistent with the stated macOS `setjmp` signal-mask issue; the author reports a 20/20 macOS regression run and Linux thread tests. Those are author-reported results, not runs performed here. ## Sources - [Current contribution rule at `b0465557fdf9daa302392cbd2e2d799fc59bbf79`](https://github.com/boykopovar/AnyPS5/blob/b0465557fdf9daa302392cbd2e2d799fc59bbf79/CONTRIBUTING.md#L67) - [PR #12897 source at reviewed head](https://github.com/boykopovar/AnyPS5/blob/33afa6a4648f9e7860413b1116f1aa6e61828486/core/libs/prx/libkernel/Pthread/src/Thread.cpp#L947-L1166) - [Open PR #9938 source at its current head](https://github.com/boykopovar/AnyPS5/blob/36a6b5c6c730c24a2024cd3f43a3ad2b46523adf/core/libs/prx/libkernel/Pthread/src/Thread.cpp) ## Not verified I did not run the focused C++ test or build locally. Hosted checks were pending. The macOS and Linux test results above are reported by the author; I did not independently reproduce them. ## To get this to a good state Agree with #9938's author on an order, record it in the dependency checklist, and rerun the affected focused tests on the resulting head. I will repeat the merge and convention checks on that head.
MarcZX10 commented 2026-10-30 05:02:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T05:02:11Z.

Review: APPROVED


Reviewed — looks good

The only blocker from my prior review is resolved: both PRs record the agreed order, with this change landing before #9938.

What I ran

Reviewed head 33afa6a4648f9e7860413b1116f1aa6e61828486 against current main base 8c8b9986204d5b1cbb23847b363df00ae832ec9c; the merge preview is clean (50e73eb9f815669bed87123283a32f3526e55d59). No changes to Thread.cpp landed on current main between the previously tested base 422f96b3a92e797c5f69c136c4a394c8da672556 and this base. Environment: Linux; no compiler invoked.

git merge-tree --write-tree 8c8b9986204d5b1cbb23847b363df00ae832ec9c 33afa6a4648f9e7860413b1116f1aa6e61828486
git diff --check 8c8b9986204d5b1cbb23847b363df00ae832ec9c...33afa6a4648f9e7860413b1116f1aa6e61828486
python tools/check_conventions.py --base upstream/main --head refs/remotes/upstream/pr-12897
git diff --quiet 422f96b3a92e797c5f69c136c4a394c8da672556 8c8b9986204d5b1cbb23847b363df00ae832ec9c -- core/libs/prx/libkernel/Pthread/src/Thread.cpp

Results

Check Result
Current-main merge preview Pass; clean tree 50e73eb9f815669bed87123283a32f3526e55d59.
git diff --check Pass; no output.
Conventions Pass.
Change since previously tested base No changes to Thread.cpp.
Landing order The author and #9938's author agreed this PR first; #9938 now lists #12897 under Depends on. The reported pre-integrated #9938 branch preserves _setjmp and resolves its moved call site.
Hosted CI Conventions and Windows passed; relinker, Linux product and specialized jobs were skipped.
Raw local command output

git merge-tree --write-tree ...:

50e73eb9f815669bed87123283a32f3526e55d59

git diff --check ...: no output (exit status 0).

python tools/check_conventions.py ...:

All conventions checks passed.

git diff --quiet ...: no output (exit status 0; no changes in the listed source path).

Negative control

Assertion Change to code under test Did the regression test fail?
Exiting a thread must not leave other threads with blocked signals on macOS. The author reports restoring setjmp/std::longjmp makes guest_pthread_create_suspended fail; I did not independently run this mutation.

Findings

Blocking

None found.

Non-blocking

The macOS/Linux test runs and the #9938 integration-branch tests are author-reported, not runs I performed. #9938's caller-stack Linux run remains pending according to the author; that follow-up belongs to #9938.

Sources

Not verified

  • I did not run local C++ tests, a build, or macOS/Linux runtime checks.
  • The posted #9938 integration branch is author-reported and was not fetched or executed here.
  • Product and specialized hosted jobs were skipped.

To get this to a good state

No further action is needed on #12897 before the agreed merge order. I will rerun the merge, diff, and conventions checks if its head changes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5708275595 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12897#pullrequestreview-5708275595). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-30T05:02:11Z. **Review:** APPROVED --- # Reviewed — looks good The only blocker from my prior review is resolved: both PRs record the agreed order, with this change landing before #9938. ## What I ran Reviewed head `33afa6a4648f9e7860413b1116f1aa6e61828486` against current `main` base `8c8b9986204d5b1cbb23847b363df00ae832ec9c`; the merge preview is clean (`50e73eb9f815669bed87123283a32f3526e55d59`). No changes to `Thread.cpp` landed on current `main` between the previously tested base `422f96b3a92e797c5f69c136c4a394c8da672556` and this base. Environment: Linux; no compiler invoked. ```sh git merge-tree --write-tree 8c8b9986204d5b1cbb23847b363df00ae832ec9c 33afa6a4648f9e7860413b1116f1aa6e61828486 git diff --check 8c8b9986204d5b1cbb23847b363df00ae832ec9c...33afa6a4648f9e7860413b1116f1aa6e61828486 python tools/check_conventions.py --base upstream/main --head refs/remotes/upstream/pr-12897 git diff --quiet 422f96b3a92e797c5f69c136c4a394c8da672556 8c8b9986204d5b1cbb23847b363df00ae832ec9c -- core/libs/prx/libkernel/Pthread/src/Thread.cpp ``` ## Results | Check | Result | |---|---| | Current-main merge preview | Pass; clean tree `50e73eb9f815669bed87123283a32f3526e55d59`. | | `git diff --check` | Pass; no output. | | Conventions | Pass. | | Change since previously tested base | No changes to `Thread.cpp`. | | Landing order | The author and #9938's author agreed this PR first; #9938 now lists `#12897` under `Depends on`. The reported pre-integrated #9938 branch preserves `_setjmp` and resolves its moved call site. | | Hosted CI | Conventions and Windows passed; relinker, Linux product and specialized jobs were skipped. | <details> <summary>Raw local command output</summary> `git merge-tree --write-tree ...`: ```text 50e73eb9f815669bed87123283a32f3526e55d59 ``` `git diff --check ...`: no output (exit status 0). `python tools/check_conventions.py ...`: ```text All conventions checks passed. ``` `git diff --quiet ...`: no output (exit status 0; no changes in the listed source path). </details> ## Negative control | Assertion | Change to code under test | Did the regression test fail? | |---|---|---| | Exiting a thread must not leave other threads with blocked signals on macOS. | The author reports restoring `setjmp`/`std::longjmp` makes `guest_pthread_create_suspended` fail; I did not independently run this mutation. | ## Findings ### Blocking None found. ### Non-blocking The macOS/Linux test runs and the #9938 integration-branch tests are author-reported, not runs I performed. #9938's caller-stack Linux run remains pending according to the author; that follow-up belongs to #9938. ## Sources - The `_setjmp` call is in [the reviewed PR head](https://github.com/boykopovar/AnyPS5/blob/33afa6a4648f9e7860413b1116f1aa6e61828486/core/libs/prx/libkernel/Pthread/src/Thread.cpp#L950), and `_longjmp` is at [the exit site](https://github.com/boykopovar/AnyPS5/blob/33afa6a4648f9e7860413b1116f1aa6e61828486/core/libs/prx/libkernel/Pthread/src/Thread.cpp#L1165). - The agreed order is recorded in [the author's update](https://github.com/boykopovar/AnyPS5/pull/12897#issuecomment-6515313387) and confirmed by [the #9938 author](https://github.com/boykopovar/AnyPS5/pull/9938#issuecomment-6510541480). - [The current contribution rule](https://github.com/boykopovar/AnyPS5/blob/8c8b9986204d5b1cbb23847b363df00ae832ec9c/CONTRIBUTING.md#L64) requires an explicit dependency when another PR must land first. ## Not verified - I did not run local C++ tests, a build, or macOS/Linux runtime checks. - The posted #9938 integration branch is author-reported and was not fetched or executed here. - Product and specialized hosted jobs were skipped. ## To get this to a good state No further action is needed on #12897 before the agreed merge order. I will rerun the merge, diff, and conventions checks if its head changes.
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!12897
No description provided.