Skip to content

Verify MSVC stack probing and Windows unwind metadata for generated Wave functions #618

Closed

Description

@LunaStev

Part of #611. Difficulty: very high. Audit baseline: master 3950416e (2026-09-12).

Current evidence

The MSVC target foundation in tests/codegen_regressions.rs checks a tiny entry function. llvm/src/codegen/ir.rs builds function IR and relies on LLVM target lowering; there is no dedicated native MSVC large-frame/unwind regression in the audited suite. This is a validation gap, not proof that LLVM emits incorrect metadata.

Scope

Exercise large live local frames crossing several guard pages, nested non-leaf calls, register spills and supported alignment requirements on x64 and ARM64. Inspect the resulting stack-probe helper resolution and applicable .pdata/.xdata records, then validate stack walking with a native Windows harness. Diagnose and fix any missing codegen attributes or runtime inputs demonstrated by those tests.

Completion criteria

Tests keep frame contents live and check them after nested calls at multiple optimization levels. Link without MinGW helper libraries and run natively with bounded timeouts. A native stack walk or virtual-unwind probe can traverse generated non-leaf frames and recover expected callers. Do not increase stack reserve merely to hide missing probes. This does not add Wave exceptions or permit foreign exceptions to cross Wave frames. Compiler-process overflow #609 remains a separate bug.

Dependencies and boundaries

#498; #617, #613; separate from argument/return ABI tasks #615 and #616.

References: Windows x64 unwindability; Windows ARM64 ABI

Activity

  1. added
    enhancement
    help wanted
    needs testing
    on Sep 12, 2026
  2. self-assigned this
    on Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementhelp wantedneeds testing

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions