fix(libkernel): honor caller-provided pthread stacks #9938

Open
BorchBe99 wants to merge 2 commits from upstream-pr/9938 into main
BorchBe99 commented 2026-10-22 22:56:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by BorchBe99 on 2026-10-22T22:56:06Z.


What

scePthreadCreate ignored a stack address set in the thread attributes. A thread created with one now runs on that memory, with the given size, on Linux and Windows. This finishes the caller-stack follow-up from #1988. The caller keeps ownership of the memory. Host startup still runs on the native stack, and TLS stays per host thread.

Caller stacks report guard size 0. Thread identity and the stack's lifetime survive return, explicit exit, cancellation and key destructors. On Windows the TEB stack bounds cover the caller's range while the thread runs and are set back to the native bounds before it ends; existing context-stack registrations and pins stay. When longjmp, siglongjmp or setcontext lands on a caller stack, the TEB gets that stack's range, also when a larger registered context stack contains it.

A caller stack has no guard page below it; the libkernel debt file records this.

Merge order with the five open PRs that share behavior with this one:

  • #8041 (@plokmklo, guard-size queries), #9684 (@NevesHenry, 16 KiB-aligned Linux stacks) and #12682 (@Felipebmaitan, cancellation of blocked POSIX reads) go first, and I update this PR onto them. Caller stacks keep reporting guard size 0 next to #8041's guard size. #9684's alignment and frame move stay on library-allocated stacks, because a caller stack's range has nothing to do with the host frame. #12682's I/O cancellation code in Thread.cpp stays as it is.
  • #7149 (@Pouare514, Windows guest-arena thread stacks) and #4563 (@poonasor, finished-stack retention) go after this one. With #7149 the caller's stack is chosen before an arena stack is allocated, and caller memory stays out of retiredWinStacks. With #4563 AwaitReap runs after the exit bridge has switched back to the native stack, because the joiner may free the caller's stack once join returns.

If one of you needs another order, reply here and I will change Depends on. #7192 (@Jev1337) and #7565 (@pushkarreddyy) can merge before or after this PR, and so can #14190 (@JJenkx) and #15165 (@ljkx), which share only lines in docs/dev/debt/libkernel.md and .github/sanitizer-known-failures.txt with it; this comment lists what the later one keeps. With #7565, its MXCSR setup moves into this PR's version of Aps5CallGuestEntry_nid_no_patch. #12688, #12700 and #12965 (all @Felipebmaitan) build on #12682 and touch this PR's files only through #12682's code. Since #9482 is merged, the new test's joined-thread case expects ESRCH from pthread_attr_get_np. Since #9573 is merged, this PR also changes its test guest_pthread_create_suspended: two of its threads are created from attributes copied from a live thread, which carry that thread's stack address, so they now get a stack of the test's own (as announced). Since #12897 and #12963 are merged, RunGuestThread calls _setjmp, and scePthreadCreate keeps the pendingException reset before this PR's caller-stack lines.

Tested

The new regression test covers all three setter paths, small stacks with large TLS, detach and reuse, and mixed cleanup chains including libc _Thrd_exit. Threads with and without a caller stack catch a host exception and then unwind with the standard unwinder across the entry trampoline to the host stack. On Windows it also checks the TEB range after a uc_link return onto a caller stack inside a larger registered context stack.

Linux x86_64, GCC 15.3.0. This head merges main at 5cb015ca (2026-11-03). On it the full default build, libs, public_headers and conventions pass, and so do the 9 pthread tests and the 16 neighbouring tests below, with the regression and guest_pthread_create_suspended again in 20 repeats each. The other Linux results are from this PR on 0278ca98 (main on 2026-11-02), before its line in .github/sanitizer-known-failures.txt, which no build compiles and only tools/sanitizer_report.py and its test tools/tests/test_sanitizer_report.py read (that test passes with the line):

  • Full default build, libs and conventions pass. The regression passes, also in 20 repeats, and so do 8 other pthread tests, guest_pthread_create_suspended (also in 20 repeats) and 16 neighbouring tests (libc threads, backtrace, mutex, cancel recovery, user context, memory, fixed mmap, and main's newer tests of thread defaults, handle lifetime, detach attributes and raised exceptions). Under ASan, 6 of 7 pthread tests and a separate range and lifecycle probe pass. The regression aborts in one case: a thread on a caller stack returns through uc_link from a makecontext context on a larger stack that contains its own. setcontext_nid_postfix ends in a [[noreturn]] call since #10838, and ASan, which still takes the caller stack for the current one, ignores the __asan_handle_no_return there and then reports a stack-buffer-overflow on the stale redzones. makecontext and setcontext have no fiber annotations, so this PR lists the test in .github/sanitizer-known-failures.txt; tools/sanitizer_report.py then counts that run as a known failure. The ASan build of this PR on b90d009d passes with the same ASan runtime, and main's own uc_link tests pass under ASan with and without this PR.
  • Full suite: of 3,492 registered tests, 3,448 pass, 43 are skipped and 1 fails (CTest exit 8): agc_driver_scattered_runs needs a udmabuf limit below two chunks and fails the same way on a clean build of 0278ca98. tools/check_skips.py rejects 3 skips: agc_driver_sparse_dma_buf_import and agc_host_import_sparse skip because this host's udmabuf size_limit_mb is above 1024, and agc_driver_optimize_on_fiber skips in a default build, which leaves ANYPS5_ENABLE_SPIRV_TOOLS off.

Windows 11 x64, local native run (not CI), this PR on 0278ca98, the tree of the Linux results above:

  • WinLibs GCC 15.2.0 (DWARF exceptions) and MSYS2 UCRT64 GCC 16.2.0 (SEH exceptions): in both, the regression (also in 20 repeats), 20 other pthread, libc-thread and timed-join tests including guest_pthread_create_suspended, and 2 user-context tests pass. The WinLibs run also covers the full build, libs, conventions and 2 memory tests.
  • Full suite (WinLibs): of 3,622 registered tests, 2,788 pass, 829 are skipped and 5 fail (CTest exit 8). vulkan_validation_gate_reports, main_sync_renames_test_feature_rename_with_detection_disabled, main_sync_renames_test_main_rename_with_detection_disabled and check_compile_test_windows_gcc_response_text_mode_is_not_reinterpreted fail the same way on a clean build of 0278ca98. pe_import_first timed out once at 10.02 s against its 10 s limit and passes when run alone, with and without this PR. tools/check_skips.py --job windows rejects 3 skips: guest_fopen_errors, which the clean build of 0278ca98 skips the same way, and 2 that come from this laptop: long_paths (long paths are disabled in the registry) and guest_video_out_high_frame_rate (the display has only 60 Hz modes).

Broken versions of the change fail the regression. On Linux, with the trampoline's CFI damaged (CFA without the final +16, or no CFA expression), it aborts at the unwind check. On Windows (WinLibs, tree ebf12e33), if GuestStackSwitch_nid_no_patch keeps the current TEB range whenever it already contains the new stack pointer, it fails at the uc_link check.

Not covered: Windows was not run on the merge with 5cb015ca, which brings #14402's thread-name change into StartNativeThread. The host-bounds check runs on the main test thread and does not see a worker's final TEB state. macOS takes the same stack switch as Linux but was not built or run. Project CI, game compatibility and performance are not tested.

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: #8041, #9684, #12682
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a (pthread change)
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4975235928 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9938). Originally posted by [BorchBe99](https://github.com/BorchBe99) on 2026-10-22T22:56:06Z. --- ### What `scePthreadCreate` ignored a stack address set in the thread attributes. A thread created with one now runs on that memory, with the given size, on Linux and Windows. This finishes the caller-stack follow-up from #1988. The caller keeps ownership of the memory. Host startup still runs on the native stack, and TLS stays per host thread. Caller stacks report guard size 0. Thread identity and the stack's lifetime survive return, explicit exit, cancellation and key destructors. On Windows the TEB stack bounds cover the caller's range while the thread runs and are set back to the native bounds before it ends; existing context-stack registrations and pins stay. When `longjmp`, `siglongjmp` or `setcontext` lands on a caller stack, the TEB gets that stack's range, also when a larger registered context stack contains it. A caller stack has no guard page below it; the libkernel debt file records this. Merge order with the five open PRs that share behavior with this one: - #8041 (@plokmklo, guard-size queries), #9684 (@NevesHenry, 16 KiB-aligned Linux stacks) and #12682 (@Felipebmaitan, cancellation of blocked POSIX reads) go first, and I update this PR onto them. Caller stacks keep reporting guard size 0 next to #8041's guard size. #9684's alignment and frame move stay on library-allocated stacks, because a caller stack's range has nothing to do with the host frame. #12682's I/O cancellation code in `Thread.cpp` stays as it is. - #7149 (@Pouare514, Windows guest-arena thread stacks) and #4563 (@poonasor, finished-stack retention) go after this one. With #7149 the caller's stack is chosen before an arena stack is allocated, and caller memory stays out of `retiredWinStacks`. With #4563 `AwaitReap` runs after the exit bridge has switched back to the native stack, because the joiner may free the caller's stack once join returns. If one of you needs another order, reply here and I will change `Depends on`. #7192 (@Jev1337) and #7565 (@pushkarreddyy) can merge before or after this PR, and so can #14190 (@JJenkx) and #15165 (@ljkx), which share only lines in `docs/dev/debt/libkernel.md` and `.github/sanitizer-known-failures.txt` with it; [this comment](https://github.com/boykopovar/AnyPS5/pull/9938#issuecomment-6355463883) lists what the later one keeps. With #7565, its MXCSR setup moves into this PR's version of `Aps5CallGuestEntry_nid_no_patch`. #12688, #12700 and #12965 (all @Felipebmaitan) build on #12682 and touch this PR's files only through #12682's code. Since #9482 is merged, the new test's joined-thread case expects `ESRCH` from `pthread_attr_get_np`. Since #9573 is merged, this PR also changes its test `guest_pthread_create_suspended`: two of its threads are created from attributes copied from a live thread, which carry that thread's stack address, so they now get a stack of the test's own ([as announced](https://github.com/boykopovar/AnyPS5/pull/9938#issuecomment-6386182474)). Since #12897 and #12963 are merged, `RunGuestThread` calls `_setjmp`, and `scePthreadCreate` keeps the `pendingException` reset before this PR's caller-stack lines. ### Tested <!-- 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. --> The new regression test covers all three setter paths, small stacks with large TLS, detach and reuse, and mixed cleanup chains including libc `_Thrd_exit`. Threads with and without a caller stack catch a host exception and then unwind with the standard unwinder across the entry trampoline to the host stack. On Windows it also checks the TEB range after a `uc_link` return onto a caller stack inside a larger registered context stack. Linux x86_64, GCC 15.3.0. This head merges `main` at `5cb015ca` (2026-11-03). On it the full default build, `libs`, `public_headers` and conventions pass, and so do the 9 pthread tests and the 16 neighbouring tests below, with the regression and `guest_pthread_create_suspended` again in 20 repeats each. The other Linux results are from this PR on `0278ca98` (`main` on 2026-11-02), before its line in `.github/sanitizer-known-failures.txt`, which no build compiles and only `tools/sanitizer_report.py` and its test `tools/tests/test_sanitizer_report.py` read (that test passes with the line): - Full default build, `libs` and conventions pass. The regression passes, also in 20 repeats, and so do 8 other pthread tests, `guest_pthread_create_suspended` (also in 20 repeats) and 16 neighbouring tests (libc threads, backtrace, mutex, cancel recovery, user context, memory, fixed mmap, and `main`'s newer tests of thread defaults, handle lifetime, detach attributes and raised exceptions). Under ASan, 6 of 7 pthread tests and a separate range and lifecycle probe pass. The regression aborts in one case: a thread on a caller stack returns through `uc_link` from a `makecontext` context on a larger stack that contains its own. `setcontext_nid_postfix` ends in a `[[noreturn]]` call since #10838, and ASan, which still takes the caller stack for the current one, ignores the `__asan_handle_no_return` there and then reports a `stack-buffer-overflow` on the stale redzones. `makecontext` and `setcontext` have no fiber annotations, so this PR lists the test in `.github/sanitizer-known-failures.txt`; `tools/sanitizer_report.py` then counts that run as a known failure. The ASan build of this PR on `b90d009d` passes with the same ASan runtime, and `main`'s own `uc_link` tests pass under ASan with and without this PR. - Full suite: of 3,492 registered tests, 3,448 pass, 43 are skipped and 1 fails (CTest exit 8): `agc_driver_scattered_runs` needs a udmabuf limit below two chunks and fails the same way on a clean build of `0278ca98`. `tools/check_skips.py` rejects 3 skips: `agc_driver_sparse_dma_buf_import` and `agc_host_import_sparse` skip because this host's udmabuf `size_limit_mb` is above 1024, and `agc_driver_optimize_on_fiber` skips in a default build, which leaves `ANYPS5_ENABLE_SPIRV_TOOLS` off. Windows 11 x64, local native run (not CI), this PR on `0278ca98`, the tree of the Linux results above: - WinLibs GCC 15.2.0 (DWARF exceptions) and MSYS2 UCRT64 GCC 16.2.0 (SEH exceptions): in both, the regression (also in 20 repeats), 20 other pthread, libc-thread and timed-join tests including `guest_pthread_create_suspended`, and 2 user-context tests pass. The WinLibs run also covers the full build, `libs`, conventions and 2 memory tests. - Full suite (WinLibs): of 3,622 registered tests, 2,788 pass, 829 are skipped and 5 fail (CTest exit 8). `vulkan_validation_gate_reports`, `main_sync_renames_test_feature_rename_with_detection_disabled`, `main_sync_renames_test_main_rename_with_detection_disabled` and `check_compile_test_windows_gcc_response_text_mode_is_not_reinterpreted` fail the same way on a clean build of `0278ca98`. `pe_import_first` timed out once at 10.02 s against its 10 s limit and passes when run alone, with and without this PR. `tools/check_skips.py --job windows` rejects 3 skips: `guest_fopen_errors`, which the clean build of `0278ca98` skips the same way, and 2 that come from this laptop: `long_paths` (long paths are disabled in the registry) and `guest_video_out_high_frame_rate` (the display has only 60 Hz modes). Broken versions of the change fail the regression. On Linux, with the trampoline's CFI damaged (CFA without the final `+16`, or no CFA expression), it aborts at the unwind check. On Windows (WinLibs, tree `ebf12e33`), if `GuestStackSwitch_nid_no_patch` keeps the current TEB range whenever it already contains the new stack pointer, it fails at the `uc_link` check. Not covered: Windows was not run on the merge with `5cb015ca`, which brings #14402's thread-name change into `StartNativeThread`. The host-bounds check runs on the main test thread and does not see a worker's final TEB state. macOS takes the same stack switch as Linux but was not built or run. Project CI, game compatibility and performance are not tested. ### 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: #8041, #9684, #12682 - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a (pthread change) - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
harisibrar1 commented 2026-10-23 03:21:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by harisibrar1 on 2026-10-23T03:21:06Z.

Review: COMMENTED


Checked against main 3875f8c8ff and FreeBSD 11.4 libthr (thr_create.c create_stack/_pthread_create, thr_attr.c):

  • The semantics match libthr. A stack given in the attributes gets guard size 0 and is never freed or reprotected by the library. Both setstack and setstackaddr treat the address as the lowest byte, and setstackaddr keeps the attr's current size. The existing EINVAL checks in both Attr.cpp files are unchanged and match.
  • The entry trampoline leaves the guest entry with rsp ≡ 8 mod 16, the same as FreeBSD's cpu_set_upcall (top &~0xf, minus 8). The DW_CFA_def_cfa_expression resolves to the native frame (*(rbp+16)+16), so unwinding back across it reads correctly.
  • Freeing the stack after scePthreadJoin is safe. Join returns only after WaitForSingleObject/pthread_join on the host thread, so the thread has left the caller stack, as with FreeBSD's thr_exit tid wakeup.
  • Small question: the non-Windows StartNativeThread branch is also the macOS path, so macOS now runs caller-stack threads too, while the description and the test registration (if(WIN32 OR CMAKE_SYSTEM_NAME STREQUAL "Linux")) cover only Linux and Windows. Could the description mention that macOS gets the same switch untested, or could the test be registered there once macOS links?
  • I couldn't build or run this here, so I can't confirm the Windows TEB and __chkstk behaviour myself. The new debt entry about host code, handlers and probes overrunning below the range reads accurately to me.

Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5623512161 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9938#pullrequestreview-5623512161). Originally posted by [harisibrar1](https://github.com/harisibrar1) on 2026-10-23T03:21:06Z. **Review:** COMMENTED --- Checked against main 3875f8c8ff and FreeBSD 11.4 libthr (`thr_create.c` `create_stack`/`_pthread_create`, `thr_attr.c`): - The semantics match libthr. A stack given in the attributes gets guard size 0 and is never freed or reprotected by the library. Both `setstack` and `setstackaddr` treat the address as the lowest byte, and `setstackaddr` keeps the attr's current size. The existing `EINVAL` checks in both `Attr.cpp` files are unchanged and match. - The entry trampoline leaves the guest entry with rsp ≡ 8 mod 16, the same as FreeBSD's `cpu_set_upcall` (top `&~0xf`, minus 8). The `DW_CFA_def_cfa_expression` resolves to the native frame (`*(rbp+16)+16`), so unwinding back across it reads correctly. - Freeing the stack after `scePthreadJoin` is safe. Join returns only after `WaitForSingleObject`/`pthread_join` on the host thread, so the thread has left the caller stack, as with FreeBSD's `thr_exit` tid wakeup. - Small question: the non-Windows `StartNativeThread` branch is also the macOS path, so macOS now runs caller-stack threads too, while the description and the test registration (`if(WIN32 OR CMAKE_SYSTEM_NAME STREQUAL "Linux")`) cover only Linux and Windows. Could the description mention that macOS gets the same switch untested, or could the test be registered there once macOS links? - I couldn't build or run this here, so I can't confirm the Windows TEB and `__chkstk` behaviour myself. The new debt entry about host code, handlers and probes overrunning below the range reads accurately to me. Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.
MarcZX10 commented 2026-10-23 05:36:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T05:36:44Z.

Review: CHANGES_REQUESTED


The caller-stack implementation and its lifetime/unwind coverage were already reviewed in my earlier comments; the author subsequently rebased to b1f516491827f8e53af5f189d064926a9128f6e2 and reports a passing Linux build, repeated focused tests, neighboring tests, ASan and conventions. Those runs are contributor-reported; hosted product build/test jobs remain skipped.

This branch is no longer current with upstream: tools/check_main_sync.py --base upstream/main --head refs/reviews/pr-9938 reports 1 ahead /278 behind, with Thread.cpp, libkernel/CMakeLists.txt, and docs/dev/debt/libkernel.md changed on both sides since the merge base. The merge is clean, but #9960 has changed Thread.cpp since this branch was based. Please refresh against current main, preserve the caller-stack lifecycle alongside that thread-startup work, and rerun the focused Linux/Windows stack and unwind tests plus conventions on the refreshed head.

The existing overlap feedback on #8041, #7149, #4563 and #9684 also still needs an agreed integration order/dependency where the shared behavior requires it; a general “whichever is ready” statement does not identify dependencies among those specific changes. Please record the agreed order in the checklist. This request is for the repository's current-main and overlap rules, not queue volume.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5624340280 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9938#pullrequestreview-5624340280). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-23T05:36:44Z. **Review:** CHANGES_REQUESTED --- The caller-stack implementation and its lifetime/unwind coverage were already reviewed in my earlier comments; the author subsequently rebased to `b1f516491827f8e53af5f189d064926a9128f6e2` and reports a passing Linux build, repeated focused tests, neighboring tests, ASan and conventions. Those runs are contributor-reported; hosted product build/test jobs remain skipped. This branch is no longer current with upstream: `tools/check_main_sync.py --base upstream/main --head refs/reviews/pr-9938` reports 1 ahead /278 behind, with `Thread.cpp`, `libkernel/CMakeLists.txt`, and `docs/dev/debt/libkernel.md` changed on both sides since the merge base. The merge is clean, but #9960 has changed `Thread.cpp` since this branch was based. Please refresh against current `main`, preserve the caller-stack lifecycle alongside that thread-startup work, and rerun the focused Linux/Windows stack and unwind tests plus conventions on the refreshed head. The existing overlap feedback on #8041, #7149, #4563 and #9684 also still needs an agreed integration order/dependency where the shared behavior requires it; a general “whichever is ready” statement does not identify dependencies among those specific changes. Please record the agreed order in the checklist. This request is for the repository's current-main and overlap rules, not queue volume.
MarcZX10 commented 2026-11-14 09:50:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-14T09:50:01Z.

Review: COMMENTED


Reviewed — no blocking findings

The change implements caller-provided pthread stacks across Linux and Windows, with a regression test covering stack execution, lifecycle, unwind, and Windows stack bounds; I found no verified blocking defect in the diff inspected.

What I ran

Read the prepared description, commits, manifest, diff, and changed-file text included in the review folder. The diff is for head db41fa38767f3347af18c7308d517e7359c13950. I did not run commands or tests.

Results

Check Result Note
Diff review passed Core implementation and test hunks inspected
Build and tests not run Results in the PR description are author-reported

Findings

Blocking

None found in the inspected diff.

Non-blocking

None.

Not verified

I could not access the prepared files/ directory through the reader, so I reviewed the diff but did not read the complete head versions of files marked included in the manifest. I did not inspect all changed-file context or run tests. The PR description reports Linux and Windows results, but those were not independently verified. No files are listed as excluded in the manifest.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5903535817 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9938#pullrequestreview-5903535817). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-14T09:50:01Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The change implements caller-provided pthread stacks across Linux and Windows, with a regression test covering stack execution, lifecycle, unwind, and Windows stack bounds; I found no verified blocking defect in the diff inspected. ## What I ran Read the prepared description, commits, manifest, diff, and changed-file text included in the review folder. The diff is for head `db41fa38767f3347af18c7308d517e7359c13950`. I did not run commands or tests. ## Results | Check | Result | Note | |---|---|---| | Diff review | passed | Core implementation and test hunks inspected | | Build and tests | not run | Results in the PR description are author-reported | ## Findings ### Blocking None found in the inspected diff. ### Non-blocking None. ## Not verified I could not access the prepared `files/` directory through the reader, so I reviewed the diff but did not read the complete head versions of files marked included in the manifest. I did not inspect all changed-file context or run tests. The PR description reports Linux and Windows results, but those were not independently verified. No files are listed as excluded in the manifest. ## To get this to a good state Nothing is required.
ligmaSec commented 2026-12-03 20:26:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T20:26:25Z.

Review: COMMENTED


The Windows startup path checks that the original host stack is fully committed and writable. The new caller-stack branch skips that check before publishing the thread and entering the supplied stack, while the attribute setter only checks the pointer and size. Could initialization validate the supplied range before reporting success, with the expected guest error pinned to available measurements?

Source review at db41fa3876. The trial merge conflicts in the pthread and CMake files. Native Windows execution remains unverified here.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6177876774 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9938#pullrequestreview-6177876774). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T20:26:25Z. **Review:** COMMENTED --- The Windows startup path checks that the original host stack is fully committed and writable. The new caller-stack branch skips that check before publishing the thread and entering the supplied stack, while the attribute setter only checks the pointer and size. Could initialization validate the supplied range before reporting success, with the expected guest error pinned to available measurements? Source review at `db41fa3876`. The trial merge conflicts in the pthread and CMake files. Native Windows execution remains unverified here. AI-assisted: yes.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/9938:upstream-pr/9938'
git switch 'upstream-pr/9938'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/9938'
git switch 'upstream-pr/9938'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/9938'
git switch 'upstream-pr/9938'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/9938'
git switch 'main'
git merge --squash 'upstream-pr/9938'
git switch 'main'
git merge --ff-only 'upstream-pr/9938'
git switch 'main'
git merge 'upstream-pr/9938'
git push origin 'main'
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!9938
No description provided.