Skip to content

Conversation

@jcouv
Copy link
Member

@jcouv jcouv commented Nov 10, 2025

Runtime specification: https://github.com/dotnet/runtime/blob/main/docs/design/specs/runtime-async.md

Note: ilasm/ildasm were already updated to recognize the "async" keyword

Relates to test plan dotnet/roslyn#75960

@jcouv jcouv self-assigned this Nov 10, 2025
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Nov 10, 2025
@jkotas jkotas added runtime-async area-Tools-ILVerification Issues related to ilverify tool and IL verification in general and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Nov 10, 2025
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @JulieLeeMSFT
See info in area-owners.md if you want to be subscribed.

@jcouv jcouv marked this pull request as ready for review November 10, 2025 18:50
Copilot AI review requested due to automatic review settings November 10, 2025 18:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for async method verification in ILVerification. The changes enable the verifier to properly handle async methods that return Task or ValueTask types by unwrapping their return types and validating the stack state accordingly.

Key changes:

  • Modified return statement verification logic to detect async methods and unwrap Task/ValueTask return types
  • Added helper method to identify and unwrap Task, ValueTask, Task, and ValueTask types
  • Added comprehensive test coverage for async method verification scenarios

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/tests/ilverify/ILTests/RuntimeAsyncTests.ilproj Project file for new async method verification tests
src/tests/ilverify/ILTests/RuntimeAsyncTests.il IL test cases covering valid and invalid async method patterns
src/coreclr/tools/ILVerification/ILImporter.Verify.cs Implementation of async method return type validation logic

@jakobbotsch
Copy link
Member

/ba-g Timeouts

@jakobbotsch
Copy link
Member

I am not sure if ILVerify tests are running in outerloop. I don't see an "ilverify" work item, and when I follow the instructions in the readme I do not get any ILVerificationTests.cmd file. @jkoritzinsky Fall out from test merging? Any idea how to run these tests now?

@jakobbotsch
Copy link
Member

jakobbotsch commented Nov 13, 2025

I think Jeremy is OOF. I was able to validate the tests locally so I think this is good to merge. I opened #121594 about the testing.

@jakobbotsch jakobbotsch merged commit 195ad74 into dotnet:main Nov 13, 2025
109 of 122 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-Tools-ILVerification Issues related to ilverify tool and IL verification in general runtime-async

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants