test(agc): skip process sampler stack test on SEH toolchains #26061

Closed
u-instinct11 wants to merge 1 commit from upstream-pr/26061 into main
u-instinct11 commented 2026-11-23 06:57:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by u-instinct11 on 2026-11-23T06:57:05Z.


What

agc_process_sampler_stack fails on MSYS2 UCRT64 GCC 16.2 with fixture unexpectedly has native Windows unwind metadata (one of the four failures in #25167). The cause is the compiler, not the GPU.

The test needs fixture frames without .pdata, so that the sampler has to step them through their DWARF records. A DWARF-exception GCC such as WinLibs is built with -fno-asynchronous-unwind-tables and leaves them out. A System V ABI SEH GCC such as MSYS2 UCRT64 doesn't get that flag, so every frame gets .pdata. I tried two ways to get DWARF-only frames there:

  • Building the fixture with -fno-asynchronous-unwind-tables selects SjLj exceptions, which fails to link.
  • Also adding -fno-exceptions drops .eh_frame, so the sampler can't walk the frames (process sampler caller: missing).

So when CMake detects ANYPS5_MINGW_SYSV_SEH_EXCEPTIONS, the test now exits with code 77 (SKIP_RETURN_CODE). DWARF toolchains still run it in full.

Tested

Windows 11 26200, MSYS2 UCRT64 GCC 16.2.0: agc_process_sampler_stack reports Skipped, and tools/check_conventions.py passes.

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 (one of the four failures in #25167)
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 5090 Laptop GPU, driver 621.01, Windows 11 26200
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5448595219 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/26061). Originally posted by [u-instinct11](https://github.com/u-instinct11) on 2026-11-23T06:57:05Z. --- ### What `agc_process_sampler_stack` fails on MSYS2 UCRT64 GCC 16.2 with `fixture unexpectedly has native Windows unwind metadata` (one of the four failures in #25167). The cause is the compiler, not the GPU. The test needs fixture frames without `.pdata`, so that the sampler has to step them through their DWARF records. A DWARF-exception GCC such as WinLibs is built with `-fno-asynchronous-unwind-tables` and leaves them out. A System V ABI SEH GCC such as MSYS2 UCRT64 doesn't get that flag, so every frame gets `.pdata`. I tried two ways to get DWARF-only frames there: - Building the fixture with `-fno-asynchronous-unwind-tables` selects SjLj exceptions, which fails to link. - Also adding `-fno-exceptions` drops `.eh_frame`, so the sampler can't walk the frames (`process sampler caller: missing`). So when CMake detects `ANYPS5_MINGW_SYSV_SEH_EXCEPTIONS`, the test now exits with code 77 (`SKIP_RETURN_CODE`). DWARF toolchains still run it in full. ### Tested Windows 11 26200, MSYS2 UCRT64 GCC 16.2.0: `agc_process_sampler_stack` reports Skipped, and `tools/check_conventions.py` passes. ### 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 - [x] Fixes: none (one of the four failures in #25167) - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 5090 Laptop GPU, driver 621.01, Windows 11 26200 - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-11-23 07:42:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-23T07:42:51Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this change; the reviewed code conditionally skips the stack-walking test on the detected System V ABI SEH toolchain while retaining its existing region checks.

What I ran

Reviewed head 29f22d9e7312d4a4f123bcea45f378364afca8b9 using the prepared diff and pinned repository reader. No test commands were run. The PR description reports a Windows 11/MSYS2 UCRT64 run; that is author-reported, not a run I performed.

Results

Check Result Note
Diff and changed code review passed Both changed files read
Tests not run No local test environment available
Negative control not run No test mutation performed

Findings

Blocking

None.

Non-blocking

None.

Sources

The conditional definition and CTest skip return code are in core/libs/prx/libSceAgcDriver/CMakeLists.txt at the reviewed head. The test returns 77 only after CheckRegions() succeeds in core/libs/prx/libSceAgcDriver/tests/ProcessSamplerStack.cpp.

Not verified

I did not run the test or verify behavior on Windows, MSYS2, or a physical console. Both changed files listed as reviewed were read; no changed files were excluded.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6017998309 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/26061#pullrequestreview-6017998309). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-23T07:42:51Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this change; the reviewed code conditionally skips the stack-walking test on the detected System V ABI SEH toolchain while retaining its existing region checks. ## What I ran Reviewed head `29f22d9e7312d4a4f123bcea45f378364afca8b9` using the prepared diff and pinned repository reader. No test commands were run. The PR description reports a Windows 11/MSYS2 UCRT64 run; that is author-reported, not a run I performed. ## Results | Check | Result | Note | |---|---|---| | Diff and changed code review | passed | Both changed files read | | Tests | not run | No local test environment available | | Negative control | not run | No test mutation performed | ## Findings ### Blocking None. ### Non-blocking None. ## Sources The conditional definition and CTest skip return code are in `core/libs/prx/libSceAgcDriver/CMakeLists.txt` at the reviewed head. The test returns 77 only after `CheckRegions()` succeeds in `core/libs/prx/libSceAgcDriver/tests/ProcessSamplerStack.cpp`. ## Not verified I did not run the test or verify behavior on Windows, MSYS2, or a physical console. Both changed files listed as reviewed were read; no changed files were excluded. ## To get this to a good state Nothing is required.
mihiii1337 commented 2026-11-23 15:00:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mihiii1337 on 2026-11-23T15:00:05Z.

Review: COMMENTED


Relationship check on exact head 29f22d9e7312d4a4f123bcea45f378364afca8b9: the CMake-detected SEH skip is correctly scoped and check_skips.py accepts its expected JUnit result. I do not see a code defect in this fallback.

However, #24354 now exercises the existing native-SEH stack walker instead of skipping the test; my new WinLibs native-SEH control passed its full caller-sample path, and current main still fails on the actual MSYS2-SEH configuration. I therefore recommend merging #24354 and then closing this PR as superseded. Merging both would restore the skip and lose the SEH regression coverage that #24354 adds.

No new MSYS2 or GPU run was performed for this comparison.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6023900271 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/26061#pullrequestreview-6023900271). Originally posted by [mihiii1337](https://github.com/mihiii1337) on 2026-11-23T15:00:05Z. **Review:** COMMENTED --- Relationship check on exact head `29f22d9e7312d4a4f123bcea45f378364afca8b9`: the CMake-detected SEH skip is correctly scoped and `check_skips.py` accepts its expected JUnit result. I do not see a code defect in this fallback. However, #24354 now exercises the existing native-SEH stack walker instead of skipping the test; my new WinLibs native-SEH control passed its full caller-sample path, and current main still fails on the actual MSYS2-SEH configuration. I therefore recommend merging #24354 and then closing this PR as superseded. Merging both would restore the skip and lose the SEH regression coverage that #24354 adds. No new MSYS2 or GPU run was performed for this comparison. AI-assisted: yes

Pull request closed

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!26061
No description provided.