Skip to content

Revert interpreter byref local zeroing in async methods - #136900

Merged
jakobbotsch merged 3 commits into
dotnet:mainfrom
jakobbotsch:revert-interp-continuation-zeroing-main
Nov 16, 2026
Merged

jakobbotsch merged 3 commits into
dotnet:mainfrom
jakobbotsch:revert-interp-continuation-zeroing-main

Conversation

@jakobbotsch

Copy link
Copy Markdown
Member

#136172 made the interpreter non-conforming here (aligning it with the JIT's behavior). The meaning of the spec is that byref-like locals are zeroed across suspension points, regardless of whether suspension actually happens or not, to make IL behavior simpler to reason about (especially around potential IL verification).

Zeroing of byref-like structs differs between the interpreter and the JIT when the await does not suspend (and is wrong in the JIT), so the test no longer covers Task.CompletedTask. Implementing this in the JIT is tracked by #115262.

Also spell out in the spec that this is the expected behavior of the zeroing.

Remove the assertion in the test that trips over the JIT's non-conformancy in this scenario.

…k case from Runtime_136000

Zeroing of byref-like structs differs between the interpreter and the JIT when the await does not suspend (and is wrong in the JIT), so the test no longer covers Task.CompletedTask.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: 9fab45db-751c-46af-91fe-dae26f06fe20
…every suspension point

Co-authored-by: Copilot <[email protected]>

Copilot-Session: 9fab45db-751c-46af-91fe-dae26f06fe20
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 4 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: @JulieLeeMSFT, @BrzVlad, @janvorli
See info in area-owners.md if you want to be subscribed.

@jakobbotsch

Copy link
Copy Markdown
Member Author

@VSadov Can you PTAL?

@jakobbotsch
jakobbotsch requested a review from VSadov November 12, 2026 13:52
@jakobbotsch

Copy link
Copy Markdown
Member Author

/ba-g MacOS build hang

@jakobbotsch
jakobbotsch merged commit f82de6a into dotnet:main Nov 16, 2026
100 of 103 checks passed
@jakobbotsch
jakobbotsch deleted the revert-interp-continuation-zeroing-main branch November 16, 2026 14:22
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Nov 19, 2026
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.

3 participants