Skip to content

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

Closed
u-instinct11 wants to merge 1 commit into
boykopovar:mainfrom
u-instinct11:fix/sampler-stack-seh-skip
Closed

u-instinct11 wants to merge 1 commit into
boykopovar:mainfrom
u-instinct11:fix/sampler-stack-seh-skip

Conversation

@u-instinct11

@u-instinct11 u-instinct11 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

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 AGC test sweep on RTX 5080 and Windows — four reproducible failures #25167)
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 5090 Laptop GPU, driver 621.01, Windows 11 26200
  • AI-assisted: yes

🤖 Generated with Claude Code

The test needs fixture frames without .pdata so the sampler steps them
through their DWARF records. GCC built for SEH (MSYS2 UCRT64) gives every
frame .pdata, and disabling it drops the DWARF records too or selects SjLj,
so the test cannot exercise that path there. Skip it with exit code 77 when
CMake detects System V ABI SEH exceptions; DWARF toolchains still run it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@oneandonlydean

Copy link
Copy Markdown
Collaborator

@u-instinct11 the change itself looks fine to me: on a toolchain that emits native unwind metadata the fixture cannot have DWARF-only frames, so skipping with return code 77 and SKIP_RETURN_CODE is the right shape, and ANYPS5_SEH_UNWIND is set only for ANYPS5_MINGW_SYSV_SEH_EXCEPTIONS builds. The conventions check fails only because the PR description does not use the template: it needs the '### What', '### Tested' and '### Checklist' headings (run 45127622798). Please edit the description to follow .github/pull_request_template.md and keep your explanation under '### What'; the checks rerun when you save it.

@github-actions github-actions Bot added build agc libSceAgc* labels Nov 23, 2026

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 mihiii1337 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@u-instinct11
u-instinct11 marked this pull request as draft November 23, 2026 15:22
@u-instinct11

Copy link
Copy Markdown
Contributor Author

Thanks @mihiii1337 for checking both implementations and the native SEH path. I agree that #24354 should go first because it exercises the caller walk on SEH toolchains. I have marked this skip fallback as a draft while that fix is open.

@github-actions

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 1368 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 1395 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5371 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5925 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6186 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6188 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6192 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6209 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6280 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6412 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6481 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6808 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7085 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7275 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7642 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7689 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 8592 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 9508 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 10193 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 10359 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 12324 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 12746 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 12828 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 12840 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 13148 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 13928 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 13929 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 17943 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 18029 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 18173 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 19610 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 20030 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 20519 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 22190 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 22424 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 22434 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 22546 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 22647 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 22697 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 23252 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 24049 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 24322 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 24661 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 24910 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 24917 core/libs/prx/libSceAgcDriver/CMakeLists.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants