fix(libkernel): keep the join reference across the cancel check #21941

Merged
AasishDairelSahayaGrinspan merged 5 commits from upstream-pr/21941 into main 2026-11-27 17:21:07 +00:00
AasishDairelSahayaGrinspan commented 2026-11-16 22:36:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by AasishDairelSahayaGrinspan on 2026-11-16T22:36:48Z.


What

JoinThread_nid_no_patch retained the thread, released the registry lock, dropped that reference (reference.Reset()), ran ThreadCancel::Check(), then re-locked and re-acquired it. In that unlocked gap a racing scePthreadDetach — legal, because _joining is not claimed yet — could release the last reference and delete the ended joinable object. The joiner then returned ESRCH, or with heap address reuse retained a new object and joined the wrong thread.

The reference taken at admission now spans RetainJoinedThread, matching scePthreadCancel and scePthreadDetach, which retain past the unlock; the intermediate reset and re-retain are removed. Only that path changes.

For coverage, a one-shot join-window test hook — the same pattern as the existing final-release hook — parks a joiner inside the window between the admission unlock and RetainJoinedThread, so the test can hold a concurrent detach against the parked joiner deterministically.

Tested

Linux (Omarchy 4.0.2), host build Release with BUILD_TESTING=ON:

  • New deterministic window test: with the joiner parked inside the window, a concurrent scePthreadDetach must not drive the final release. Negative control — with the change reverted (the removed reset and re-retain re-added around the hook) the assertion fails in 3/3 runs, aborting at the invariant, so the test covers this change.
  • The fixed build passes 14 runs (10 unpinned, 4 pinned to a single core with taskset -c 0) at 0.08–0.12 s, under the unchanged 20 s timeout.
  • The join/detach interleave stays as a stress exercise: deadline-tolerant, fails only on an out-of-contract result, and does not claim to reproduce the window.
  • Existing cases in the same test and the rest of the pthread suite pass; check_conventions.py --base origin/main passes; pr_overlap --branch reports no overlap.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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:5346466056 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21941). Originally posted by [AasishDairelSahayaGrinspan](https://github.com/AasishDairelSahayaGrinspan) on 2026-11-16T22:36:48Z. --- ### What `JoinThread_nid_no_patch` retained the thread, released the registry lock, dropped that reference (`reference.Reset()`), ran `ThreadCancel::Check()`, then re-locked and re-acquired it. In that unlocked gap a racing `scePthreadDetach` — legal, because `_joining` is not claimed yet — could release the last reference and delete the ended joinable object. The joiner then returned `ESRCH`, or with heap address reuse retained a new object and joined the wrong thread. The reference taken at admission now spans `RetainJoinedThread`, matching `scePthreadCancel` and `scePthreadDetach`, which retain past the unlock; the intermediate reset and re-retain are removed. Only that path changes. For coverage, a one-shot join-window test hook — the same pattern as the existing final-release hook — parks a joiner inside the window between the admission unlock and `RetainJoinedThread`, so the test can hold a concurrent detach against the parked joiner deterministically. ### Tested Linux (Omarchy 4.0.2), host build `Release` with `BUILD_TESTING=ON`: - New deterministic window test: with the joiner parked inside the window, a concurrent `scePthreadDetach` must not drive the final release. Negative control — with the change reverted (the removed reset and re-retain re-added around the hook) the assertion fails in 3/3 runs, aborting at the invariant, so the test covers this change. - The fixed build passes 14 runs (10 unpinned, 4 pinned to a single core with `taskset -c 0`) at 0.08–0.12 s, under the unchanged 20 s timeout. - The join/detach interleave stays as a stress exercise: deadline-tolerant, fails only on an out-of-contract result, and does not claim to reproduce the window. - Existing cases in the same test and the rest of the pthread suite pass; `check_conventions.py --base origin/main` passes; `pr_overlap --branch` reports no overlap. ### 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](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) and the licence notice of code adapted from upstream (see AGENTS.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 -->
PrivacyOnion commented 2026-11-16 22:38:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-16T22:38:21Z.

Review: CHANGES_REQUESTED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 607d118545:

  • Conventions: tools/check_conventions.py passed.
  • Build: guest_pthread_final_release_race_tests built cleanly.
  • CTest (guest_pthread_final_release_race):
    1/1 Test #5221: guest_pthread_final_release_race ...Subprocess aborted***Exception:   5.36 sec
    0% tests passed, 1 tests failed out of 1
    
    The following tests FAILED:
    

Requesting changes for the points above.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5929116060 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21941#pullrequestreview-5929116060). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-16T22:38:21Z. **Review:** CHANGES_REQUESTED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `607d118545`: - **Conventions**: `tools/check_conventions.py` passed. - **Build**: `guest_pthread_final_release_race_tests` built cleanly. - **CTest** (`guest_pthread_final_release_race`): ``` 1/1 Test #5221: guest_pthread_final_release_race ...Subprocess aborted***Exception: 5.36 sec 0% tests passed, 1 tests failed out of 1 ``` ``` The following tests FAILED: ``` Requesting changes for the points above.
PrivacyOnion commented 2026-11-17 09:41:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-17T09:41:54Z.

Review: CHANGES_REQUESTED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against abffc39628:

  • Conventions: tools/check_conventions.py passed.
  • Build: guest_pthread_final_release_race_tests built cleanly.
  • CTest (guest_pthread_final_release_race):
    1/1 Test #5325: guest_pthread_final_release_race ...   Passed    0.62 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: the tests still pass with the change reverted, so they do not cover it

Requesting changes for the points above.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5936101232 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21941#pullrequestreview-5936101232). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-17T09:41:54Z. **Review:** CHANGES_REQUESTED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `abffc39628`: - **Conventions**: `tools/check_conventions.py` passed. - **Build**: `guest_pthread_final_release_race_tests` built cleanly. - **CTest** (`guest_pthread_final_release_race`): ``` 1/1 Test #5325: guest_pthread_final_release_race ... Passed 0.62 sec 100% tests passed, 0 tests failed out of 1 ``` - **Negative control**: the tests still pass with the change reverted, so they do not cover it Requesting changes for the points above.
MarcZX10 commented 2026-11-17 20:30:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-17T20:30:45Z.

Review: COMMENTED


Reviewed — no blocking findings

Nothing blocks this; the points below are optional, but CI and the tests were not checked in this run, so no approval is given.

What I ran

  • Head abffc3962879f127e6054bc250be7ea424cc482b, base main.
  • Read the description, commits, manifest, diff and the head text of Thread.cpp (join path and RetainJoinedThread) and of GuestPthreadFinalReleaseRace.cpp (gate helpers and the admission test) through the reader.
  • No build, no test run, no hosted CI query.

Results

Check Result Note
Diff read passed Both changed files
Hosted CI for head not run Not queried in this run
Build and tests not run Not built here
Author's test report not applicable Author-reported, not verified here

Findings

Blocking

None.

Non-blocking

  • core/libs/tests/GuestPthreadFinalReleaseRace.cpp:71: WaitUntilReleased now returns silently on timeout instead of failing. The admission test still checks result == SCE_KERNEL_ERROR_ESRCH afterwards, so a stall no longer fails with its own message.
  • core/libs/tests/GuestPthreadFinalReleaseRace.cpp:48: WaitForFinalRelease no longer requires that the final-release hook was reached. RequireAdmissionRejectsFinalRelease still calls it and continues, so that test no longer asserts its own precondition. Consider keeping a Require on the returned bool in the admission path.
  • core/libs/tests/GuestPthreadFinalReleaseRace.cpp:195: each RequireJoinDetachInterleaves run creates 1000 guest threads with 64 KiB stacks, and the test repeats it 60 times. That is a lot of threads per run; a smaller padding count may be enough.

Sources

Not verified

  • Whether the reference's destructor releases on every return path of JoinThread_nid_no_patch. GuestThreadReference was not read.
  • The description's claim that scePthreadCancel and scePthreadDetach retain the same way. Those functions were not read.
  • Build, the author's 13 test runs, the Windows run, and the required hosted checks for this head. None was run or confirmed here.
  • Ordering of the final-release hook against the joiner and racer threads under the 8 s loop deadline in RequireJoinDetachInterleave. Read, not traced.
  • The test file was read only in its changed regions, not in full.

To get this to a good state

Nothing is required.

Optional: keep a Require on the final-release precondition in the admission test, and reduce the padding count if the run time allows.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5946102305 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21941#pullrequestreview-5946102305). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-17T20:30:45Z. **Review:** COMMENTED --- # Reviewed — no blocking findings Nothing blocks this; the points below are optional, but CI and the tests were not checked in this run, so no approval is given. ## What I ran - Head `abffc3962879f127e6054bc250be7ea424cc482b`, base `main`. - Read the description, commits, manifest, diff and the head text of `Thread.cpp` (join path and `RetainJoinedThread`) and of `GuestPthreadFinalReleaseRace.cpp` (gate helpers and the admission test) through the reader. - No build, no test run, no hosted CI query. ## Results | Check | Result | Note | |---|---|---| | Diff read | passed | Both changed files | | Hosted CI for head | not run | Not queried in this run | | Build and tests | not run | Not built here | | Author's test report | not applicable | Author-reported, not verified here | ## Findings **Blocking** None. **Non-blocking** - `core/libs/tests/GuestPthreadFinalReleaseRace.cpp:71`: `WaitUntilReleased` now returns silently on timeout instead of failing. The admission test still checks `result == SCE_KERNEL_ERROR_ESRCH` afterwards, so a stall no longer fails with its own message. - `core/libs/tests/GuestPthreadFinalReleaseRace.cpp:48`: `WaitForFinalRelease` no longer requires that the final-release hook was reached. `RequireAdmissionRejectsFinalRelease` still calls it and continues, so that test no longer asserts its own precondition. Consider keeping a `Require` on the returned `bool` in the admission path. - `core/libs/tests/GuestPthreadFinalReleaseRace.cpp:195`: each `RequireJoinDetachInterleaves` run creates 1000 guest threads with 64 KiB stacks, and the test repeats it 60 times. That is a lot of threads per run; a smaller padding count may be enough. ## Sources - Join reference now held across the cancel check: [Thread.cpp at abffc39](https://github.com/boykopovar/AnyPS5/blob/abffc3962879f127e6054bc250be7ea424cc482b/core/libs/prx/libkernel/Pthread/src/Thread.cpp#L1344-L1356) - Gate helpers and admission test: [GuestPthreadFinalReleaseRace.cpp at abffc39](https://github.com/boykopovar/AnyPS5/blob/abffc3962879f127e6054bc250be7ea424cc482b/core/libs/tests/GuestPthreadFinalReleaseRace.cpp#L48-L57) ## Not verified - Whether the reference's destructor releases on every return path of `JoinThread_nid_no_patch`. `GuestThreadReference` was not read. - The description's claim that `scePthreadCancel` and `scePthreadDetach` retain the same way. Those functions were not read. - Build, the author's 13 test runs, the Windows run, and the required hosted checks for this head. None was run or confirmed here. - Ordering of the final-release hook against the joiner and racer threads under the 8 s loop deadline in `RequireJoinDetachInterleave`. Read, not traced. - The test file was read only in its changed regions, not in full. ## To get this to a good state Nothing is required. Optional: keep a `Require` on the final-release precondition in the admission test, and reduce the padding count if the run time allows.
PrivacyOnion commented 2026-11-17 22:14:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-17T22:14:33Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 4883355afe:

  • Conventions: tools/check_conventions.py passed.
  • Build: guest_pthread_final_release_race_tests built cleanly.
  • CTest (guest_pthread_final_release_race):
    1/1 Test #5376: guest_pthread_final_release_race ...   Passed    0.11 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: with core/libs/prx/libkernel/Pthread/src/Thread.cpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • Verified that retaining reference across ThreadCancel::Check() in JoinThread_nid_no_patch prevents final-release race without leaking references on error returns (registered RAII lock and Retain/GuestThreadRef handle release properly on scope exit)
    • Verified JoinWindowTestHook installation, atomic exchange invocation, and thread safety across Thread.cpp and GuestPthreadFinalReleaseRace.cpp
    • Verified that RequireJoinWindowKeepsReference correctly tests the retained reference invariant using APS5_Test_SetJoinWindowHook and negative control reproduction
    • Confirmed no memory leaks, undefined behavior, or Windows/Linux portability issues across LP64 and LLP64 in the diff
    • Verified AGENTS.md compliance: conventions pass, no comments added in code, no fake stubs introduced, proper naming conventions followed

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5947518873 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21941#pullrequestreview-5947518873). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-17T22:14:33Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `4883355afe`: - **Conventions**: `tools/check_conventions.py` passed. - **Build**: `guest_pthread_final_release_race_tests` built cleanly. - **CTest** (`guest_pthread_final_release_race`): ``` 1/1 Test #5376: guest_pthread_final_release_race ... Passed 0.11 sec 100% tests passed, 0 tests failed out of 1 ``` - **Negative control**: with `core/libs/prx/libkernel/Pthread/src/Thread.cpp` reverted to `main`, the new tests do not build/link without the change; restoring it makes them build and pass. - **Code reading**: - Verified that retaining reference across ThreadCancel::Check() in JoinThread_nid_no_patch prevents final-release race without leaking references on error returns (registered RAII lock and Retain/GuestThreadRef handle release properly on scope exit) - Verified JoinWindowTestHook installation, atomic exchange invocation, and thread safety across Thread.cpp and GuestPthreadFinalReleaseRace.cpp - Verified that RequireJoinWindowKeepsReference correctly tests the retained reference invariant using APS5_Test_SetJoinWindowHook and negative control reproduction - Confirmed no memory leaks, undefined behavior, or Windows/Linux portability issues across LP64 and LLP64 in the diff - Verified AGENTS.md compliance: conventions pass, no comments added in code, no fake stubs introduced, proper naming conventions followed Looks Good To Me
MarcZX10 commented 2026-11-18 00:26:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-18T00:26:18Z.

Review: COMMENTED


Reviewed — comments

Nothing blocks this review; the points below are optional.

What I ran

Reviewed head 4883355afecd7518f14e983c230d0f938baab246. I read the prepared description, commits, manifest, diff, and both included changed files through repo_read.py. I ran no build or tests.

Results

Check Result Note
Code review passed Both changed files read
Build and tests not run Linux run reported by author only
Negative control not run Reported by author, not independently verified

Findings

Blocking

None.

Non-blocking

  • core/libs/tests/GuestPthreadFinalReleaseRace.cpp:276 aborts immediately if the test hook is not entered. The preceding wait loop at lines 252–256 has a five-second deadline but does not assert that the worker finished. If that scheduling wait times out, the test can fail later at the ten-second hook wait with less useful diagnostic context. Consider requiring WorkerFinished(thread) before installing the hook.

Not verified

  • No tests, build, or negative control were run in this review; the environment exposed only review-folder and pinned repository reader tools. The Linux results and negative-control claim in the PR description are author-reported.
  • files.json was not available through the reader; the manifest identifies both changed files as included, and both were read. No other changed paths were listed in the manifest.
  • No merged preview or CI results were inspected.

To get this to a good state

Nothing is required. Optional: assert that the worker finished before installing the join-window hook.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5948924180 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21941#pullrequestreview-5948924180). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-18T00:26:18Z. **Review:** COMMENTED --- # Reviewed — comments Nothing blocks this review; the points below are optional. ## What I ran Reviewed head `4883355afecd7518f14e983c230d0f938baab246`. I read the prepared description, commits, manifest, diff, and both included changed files through `repo_read.py`. I ran no build or tests. ## Results | Check | Result | Note | |---|---|---| | Code review | passed | Both changed files read | | Build and tests | not run | Linux run reported by author only | | Negative control | not run | Reported by author, not independently verified | ## Findings ### Blocking None. ### Non-blocking - `core/libs/tests/GuestPthreadFinalReleaseRace.cpp:276` aborts immediately if the test hook is not entered. The preceding wait loop at lines 252–256 has a five-second deadline but does not assert that the worker finished. If that scheduling wait times out, the test can fail later at the ten-second hook wait with less useful diagnostic context. Consider requiring `WorkerFinished(thread)` before installing the hook. ## Not verified - No tests, build, or negative control were run in this review; the environment exposed only review-folder and pinned repository reader tools. The Linux results and negative-control claim in the PR description are author-reported. - `files.json` was not available through the reader; the manifest identifies both changed files as included, and both were read. No other changed paths were listed in the manifest. - No merged preview or CI results were inspected. ## To get this to a good state Nothing is required. Optional: assert that the worker finished before installing the join-window hook.
PrivacyOnion commented 2026-11-18 01:04:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-18T01:04:18Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 572b1b1c09:

  • Conventions: tools/check_conventions.py passed.
  • Build: guest_pthread_final_release_race_tests built cleanly.
  • CTest (guest_pthread_final_release_race):
    1/1 Test #5392: guest_pthread_final_release_race ...   Passed    0.12 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: with core/libs/prx/libkernel/Pthread/src/Thread.cpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • Verified reference counting lifecycle in JoinThread_nid_no_patch: retaining thread across the unlock and ThreadCancel::Check() eliminates the TOCTOU window where scePthreadDetach could free the thread object before re-lock
    • Checked error return codes in JoinThread_nid_no_patch (SCE_KERNEL_ERROR_EINVAL for detached threads, SCE_KERNEL_ERROR_ESRCH for invalid/already-joined threads), ensuring adherence to PS5 libkernel specifications
    • Audited APS5_Test_SetJoinWindowHook and APS5_Test_SetFinalThreadReleaseHook concurrency safety, memory ordering semantics, and test gate synchronization in GuestPthreadFinalReleaseRace.cpp
    • Verified LP64/LLP64 portability and type consistency across atomic operations and integer return values on both Linux and Windows platforms
    • Confirmed strict AGENTS.md compliance: zero code comments introduced, no prohibited stubs, clean check_conventions, and appropriate test cleanup

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5949267199 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21941#pullrequestreview-5949267199). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-18T01:04:18Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `572b1b1c09`: - **Conventions**: `tools/check_conventions.py` passed. - **Build**: `guest_pthread_final_release_race_tests` built cleanly. - **CTest** (`guest_pthread_final_release_race`): ``` 1/1 Test #5392: guest_pthread_final_release_race ... Passed 0.12 sec 100% tests passed, 0 tests failed out of 1 ``` - **Negative control**: with `core/libs/prx/libkernel/Pthread/src/Thread.cpp` reverted to `main`, the new tests do not build/link without the change; restoring it makes them build and pass. - **Code reading**: - Verified reference counting lifecycle in JoinThread_nid_no_patch: retaining thread across the unlock and ThreadCancel::Check() eliminates the TOCTOU window where scePthreadDetach could free the thread object before re-lock - Checked error return codes in JoinThread_nid_no_patch (SCE_KERNEL_ERROR_EINVAL for detached threads, SCE_KERNEL_ERROR_ESRCH for invalid/already-joined threads), ensuring adherence to PS5 libkernel specifications - Audited APS5_Test_SetJoinWindowHook and APS5_Test_SetFinalThreadReleaseHook concurrency safety, memory ordering semantics, and test gate synchronization in GuestPthreadFinalReleaseRace.cpp - Verified LP64/LLP64 portability and type consistency across atomic operations and integer return values on both Linux and Windows platforms - Confirmed strict AGENTS.md compliance: zero code comments introduced, no prohibited stubs, clean check_conventions, and appropriate test cleanup Looks Good To Me
MarcZX10 commented 2026-11-18 01:08:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-18T01:08:58Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this change; the reference remains held across the cancel check and the new deterministic test exercises the detach race.

What I ran

Reviewed head 572b1b1c098de1401758d673bbd51525e41ed56c. I read description.md, commits.md, manifest.json, diff.patch, Thread.cpp, and GuestPthreadFinalReleaseRace.cpp using repo_read.py. I did not run build or test commands.

Results

Check Result Note
Changed code review passed Both changed files read
Build and tests not run Results in the PR description are author-reported

Findings

Blocking

None.

Non-blocking

None.

Not verified

Build/test results and the reported negative control were not independently verified. No files were excluded from the review; both files marked reviewed in the manifest were read.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5949305553 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21941#pullrequestreview-5949305553). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-18T01:08:58Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this change; the reference remains held across the cancel check and the new deterministic test exercises the detach race. ## What I ran Reviewed head `572b1b1c098de1401758d673bbd51525e41ed56c`. I read `description.md`, `commits.md`, `manifest.json`, `diff.patch`, `Thread.cpp`, and `GuestPthreadFinalReleaseRace.cpp` using `repo_read.py`. I did not run build or test commands. ## Results | Check | Result | Note | |---|---|---| | Changed code review | passed | Both changed files read | | Build and tests | not run | Results in the PR description are author-reported | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified Build/test results and the reported negative control were not independently verified. No files were excluded from the review; both files marked reviewed in the manifest were read. ## To get this to a good state Nothing is required.
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!21941
No description provided.