Skip to content

[cDAC][wasm] Filter unexpected register slots in non-active frames - #135093

Merged
radekdoulik merged 2 commits into
dotnet:mainfrom
radekdoulik:radekdoulik-cdac-wasm-register-policy
Oct 8, 2026
Merged

radekdoulik merged 2 commits into
dotnet:mainfrom
radekdoulik:radekdoulik-cdac-wasm-register-policy

Conversation

@radekdoulik

@radekdoulik radekdoulik commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Follow-up to Larry Ewing's review comment on #135055.

Wasm GC info must not contain register slots. Update WasmGCInfoTraits.IsScratchRegister to call Debug.Fail and return false, matching the native decoder fallback. The false return preserves existing fallback behavior; valid Wasm GC info decoding, active-frame behavior, encoding constants, and HAS_INTERRUPTIBLE_RANGES are unchanged.

Also document this invariant in the GCInfo contract specification. No generic decoder, interpreter, stack-walker, or test source changes are included.

Validation

  • Managed cDAC build: passed with 0 warnings and 0 errors.
  • Existing Wasm GCInfo tests: 4 passed, 0 failed.
  • Full cDAC unit suite: 3,236 passed, 0 failed, 0 skipped.
  • Generated contract documentation check: passed.

No native/runtime/browser rebuild or live Wasm demo was run.

Note

This PR description was updated with GitHub Copilot.

Treat unexpected Wasm register slots as scratch, with a concise rationale and matching contract clarification. Preserve active-frame behavior and all encoding constants.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 5 pipeline(s).
11 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag
See info in area-owners.md if you want to be subscribed.

@radekdoulik radekdoulik added this to the 12.0.0 milestone Oct 2, 2026
Jan Kotas noted that returning true from IsScratchRegister diverges from the native unknown-platform fallback, which asserts and returns false (gcinfodecoder.cpp PORTABILITY_ASSERT). Mirror that: Debug.Fail to flag the unreachable call in debug builds, then return false like the native helper and other unimplemented platforms. Update the matching contract-spec sentence.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@radekdoulik

Copy link
Copy Markdown
Member Author

/ba-g the failures are unrelated/preexisting

None of the latest CI failures is related to our Wasm change.

Job Verdict Issue
1 Windows x86 cDAC stress Pre-existing/unrelated #135085, #135086, #135217
2 Linux Arm32 dump test Never executed; Helix dead-letter None
3 Linux Arm32 stress test Never executed; Helix dead-letter None

@radekdoulik
radekdoulik merged commit 47ed2f5 into dotnet:main Oct 8, 2026
80 of 84 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants