Skip to content

[Stacked 2/3] Prevent stale managed return values for Runtime Async suspension - #1

Closed
tommcdon wants to merge 1 commit into
dev/tommcdon/runtime-async-elt-contractfrom
dev/tommcdon/runtime-async-mrv-safety
Closed

[Stacked 2/3] Prevent stale managed return values for Runtime Async suspension#1
tommcdon wants to merge 1 commit into
dev/tommcdon/runtime-async-elt-contractfrom
dev/tommcdon/runtime-async-mrv-safety

Conversation

@tommcdon

@tommcdon tommcdon commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Note

Stacked PR 2/3, based on dotnet/runtime#131985.
Next: tommcdon/runtime#2
Only the final MRV commit is new. Retarget to dotnet/runtime:main after the base PR merges.

Summary

Prevent debuggers from exposing stale managed return values when a Runtime Async call suspends.

The JIT reports the async continuation register alongside managed-return-value debug information. DBI rejects the value while that continuation is non-null, while preserving return values for synchronously completed calls. Interpreter async calls suppress MRV homes until equivalent continuation-state information is available.

Includes Windows and Linux coverage for synchronous completion and genuine suspension.

Partially addresses dotnet#121011.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@tommcdon
tommcdon force-pushed the dev/tommcdon/runtime-async-mrv-safety branch from f7c6757 to 9219342 Compare August 7, 2026 04:20
@tommcdon

tommcdon commented Aug 7, 2026

Copy link
Copy Markdown
Owner Author

Closing this fork-only stacked PR. The branch has been rebased independently onto dotnet/runtime main and will be submitted as a standalone upstream PR.

@tommcdon tommcdon closed this Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant