fix(diagnostics): unwind sampled process thread callers #13131
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/13131"
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 Rengundom on 2026-10-30T03:46:50Z.
What
The Windows process-wide sampler creates per-thread walkers without stack bounds, so DWARF unwinding stops at the sampled frame. When existing bounds do not cover the sampled stack pointer, find the committed, accessible region that contains it. Keep reads within that region, and reject guarded, inaccessible and uncommitted regions.
Tested
Windows 11, MinGW GCC 15.2, Release. A new CTest samples an optimized busy function and checks for its exact caller address in the report. With main's code it fails with zero caller samples; with this change it passes, including 10 consecutive runs. It also checks that the fixture has no native Windows unwind entry, so it exercises DWARF unwinding. The test finishes in under one second and has a 20-second timeout. All four existing worker-sampler modes and agc_stack_walk pass on main and the change. A separate diagnostic of the actual walker checks boundary words, guard-page preservation, and no-access, reserved and null regions.
Matched main/change GPU tests agc_driver_bindless_images, agc_driver_image_sample_reduction and agc_driver_image_table pass with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation. The layer loads in each GPU test, and neither log has VUIDs, validation errors or missing-layer warnings. No game run or performance claim.
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 copilot-pull-request-reviewer[bot] on 2026-10-30T03:47:00Z.
Review: COMMENTED
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.