Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Sep 22, 2025

Backport of #119864 to release/10.0

/cc @VSadov

Customer Impact

  • Customer reported

  • Found internally

  • In async methods the GS cookie check, if also present, could end up using (and corrupting) the same register as used to return continuation.

  • Synthetic async thunks that provide interop between ordinary task-returning methods and runtime async methods, did not special-case ValueTask, which is sufficiently different to require slightly different IL.

  • When multiple awaits are in the same try block, the async analysis could pay attention only to the first one and skip over others.

These bugs require fairly trivial fixes, but otherwise could result in crashes in affected scenarios.

Regression

  • Yes
  • No

This is new code/scenarios with runtime async.

Testing

The fix was verified on existing libraries tests that caught the issues.

Risk

Low, most changes are to the new code that is only enabled with runtime async.

@VSadov VSadov added area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI area-VM-coreclr runtime-async labels Sep 22, 2025
@dotnet-policy-service
Copy link
Contributor

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

@dotnet-policy-service
Copy link
Contributor

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

@VSadov VSadov requested a review from AndyAyersMS September 22, 2025 20:50
@VSadov
Copy link
Member

VSadov commented Sep 22, 2025

@AndyAyersMS - could you take a look at this backport PR?

Copy link
Member

@JulieLeeMSFT JulieLeeMSFT left a comment

Choose a reason for hiding this comment

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

LGTM. Fixing crash.

@JulieLeeMSFT JulieLeeMSFT added this to the 10.0.0 milestone Sep 22, 2025
@kg
Copy link
Member

kg commented Sep 22, 2025

I don't see anything fatal, so seems fine.

Copy link
Member

@AndyAyersMS AndyAyersMS left a comment

Choose a reason for hiding this comment

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

JIT changes LGTM.

@JulieLeeMSFT
Copy link
Member

Adding @davidwrighton for VM review.

@JulieLeeMSFT JulieLeeMSFT added the Servicing-approved Approved for servicing release label Sep 22, 2025
@agocke agocke enabled auto-merge (squash) September 22, 2025 22:04
@agocke agocke disabled auto-merge September 22, 2025 22:04
@agocke agocke merged commit a83ae91 into release/10.0 Sep 22, 2025
108 of 117 checks passed
@agocke agocke deleted the backport/pr-119864-to-release/10.0 branch September 22, 2025 22:05
@VSadov
Copy link
Member

VSadov commented Sep 22, 2025

Thanks!!!

Copy link
Member

@davidwrighton davidwrighton left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions bot locked and limited conversation to collaborators Oct 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI area-VM-coreclr runtime-async Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants