test(libSceAgcDriver): check the sampled caller through native unwind data on SEH toolchains #24354
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/24354"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by einfachama on 2026-11-20T14:59:32Z.
What
agc_process_sampler_stackfails on every Windows build with an SEH toolchain (MSYS2 UCRT64 GCC) before it checks the sampler:fixture unexpectedly has native Windows unwind metadata. The check came with #13131. It requiresBusyto have noRUNTIME_FUNCTION, so the walk takes the.ehframpath. That holds only whencore/libs/CMakeLists.txtadds-fno-asynchronous-unwind-tables, which it does for DWARF exceptions (WinLibs). With an SEH toolchain every function has.pdata.The test now branches on
__SEH__, ascore/libs/tests/GuestModuleInfo.cppdoes. On SEH builds it requires the fixture's native unwind entry and checks the caller throughRtlVirtualUnwind. DWARF builds keep the same check and message as before (-fno-asynchronous-unwind-tablesleaves__SEH__undefined), so the.ehframwalk stays covered by the WinLibs job. The sampler code is the same on both toolchains, so there is no debt entry.CI on
main:windowsjob of themainpush build at0a025bd3c6, passing: job.Tested
Windows 11 Pro 26H2 (10.0.26300), MSYS2 UCRT64 GCC 16.2.0-7, Release; WinLibs not tested locally, CI covers it.
agc_process_sampler_stackfails onmainand passes 10 of 10 runs with this change (ctest --repeat until-fail:10), 44 to 45 inclusive caller samples each.NativeUnwindFixtureistrueat-O3andfalsewith-fno-asynchronous-unwind-tables, the flag DWARF builds use.tools/select_tests.pyselected 1135 tests; all pass with--timeout 120.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T01:55:16Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the available evidence supports the compiler-specific fixture expectation.
What I ran
Reviewed head
d36d0c84b0845a24af1dec4008e226a941831f65and its prepared diff. No commands or tests were run.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
Did not independently run the Windows test or verify the reported CI results. Reviewed
core/libs/prx/libSceAgcDriver/tests/ProcessSamplerStack.cpp;manifest.jsonlists this as the only changed file and marks its full text included. No files were excluded in the supplied manifest.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by mihiii1337 on 2026-11-23T14:59:47Z.
Review: APPROVED
Reviewed exact head
d36d0c84b0845a24af1dec4008e226a941831f65with a new native Windows-SEH control.I compiled the exact test and
WorkerSamplersources in Release with WinLibs GCC 15.2, linked them directly to the existing hashed runtime libraries, and confirmed the object uses the native SEH form (__SEH__,.pdata/.xdata). The full sampler test passed 43 checks, including the caller-frame samples that the current main test refuses when it sees native Windows unwind metadata. The corresponding DWARF control remains covered separately.This is deliberately not a new MSYS2 build. The independent MSYS2 A/B already reported 0/3 on old main and 3/3 on this change, and the latest main MSYS2 nightly still reproduces
fixture unexpectedly has native Windows unwind metadata; I am not claiming those runs as mine. The exact-head Hosted Windows job is green with the test executed; Hosted Linux was skipped. No GPU path was involved.#26061's conditional skip is mechanically correct, but this PR is preferable because it preserves and exercises SEH stack-walk coverage rather than skipping it. Within that scope I found no remaining blocker. This approval is limited to the exact commit above.
AI-assisted: yes