Repository navigation
Reuse handle-based unwind lookup for WebAssembly - #136168
Merged
Merged
Conversation
Remove the redundant direct-PC unwind API and use the existing ExecutionManager code-block lookup in the Wasm unwinder. Update related tests and contract documentation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
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. |
Contributor
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
lewing
reviewed
Oct 20, 2026
lewing
approved these changes
Oct 20, 2026
lewing
left a comment
Member
There was a problem hiding this comment.
lgtm, one non-blocking comment about tests
max-charlamb
approved these changes
Oct 20, 2026
3 tasks
davidwrighton
approved these changes
Oct 20, 2026
Contributor
Author
|
/ba-g unrelated diagnostic fails |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Route WASM R2R unwind-data lookup through the existing
ExecutionManagerAPIs instead of maintaining a separate control-PC-only lookup path.WasmR2RInfo.TryGetUnwindDatanow resolves the virtual IP withGetCodeBlockHandle, then obtains the runtime-function entry and image base throughGetUnwindInfoandGetUnwindInfoBaseAddress. This aligns WASM cDAC unwinding with the lookup pattern used on other architectures and removesIExecutionManager.TryGetUnwindInfoand its implementation.Changes
ExecutionManager.Validation
Validated with nesm against a CI runtime and crossgen2 matching the tagged-frame ABI, using snapshots captured during real exception processing at six stops: exception dispatch, native virtual unwind, a first-pass filter, second-pass dispatch, second-pass invocation, and a finally funclet.
The branch and baseline produced identical complete public
IStackWalkresults across all six snapshots: 135 stack-walk entries, including 98 managed frames, per reader. Validation also checked 94 productionWasmContext.Unwindsteps per reader, including caller SP/IP/FP, and cold MethodDesc/unwind-data resolution for 33 frame instances per reader. Filter/finally funclets and managed/interpreter/native transitions were exercised, and the fixture completed with the expected result.Target artifacts: runtime CI build 1641014. These results cover cDAC unwinding against that target, not a native runtime rebuilt from this branch.
Note
This PR description was generated with GitHub Copilot.