Skip to content

JIT: Check for inline candidates in gtTreeContainsAsyncCall#124502

Open
jakobbotsch wants to merge 1 commit intodotnet:mainfrom
jakobbotsch:fix-124496
Open

JIT: Check for inline candidates in gtTreeContainsAsyncCall#124502
jakobbotsch wants to merge 1 commit intodotnet:mainfrom
jakobbotsch:fix-124496

Conversation

@jakobbotsch
Copy link
Member

@jakobbotsch jakobbotsch commented Feb 17, 2026

Inline candidates can later be substituted for the original call. That call may contain async calls, in which case the same spilling behavior should kick in.

Fix #124496

Inline candidates can later be substituted for the original call. That
call may contain async calls, in which case the standard spilling
behavior should kick.
Copilot AI review requested due to automatic review settings February 17, 2026 09:46
@github-actions github-actions bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Feb 17, 2026
@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.

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 fixes a JIT code generation bug where async calls within inline candidates were not properly detected, causing incorrect register/memory handling that led to null reference crashes in Native AOT scenarios with runtime async enabled.

Changes:

  • Enhanced gtTreeContainsAsyncCall to recursively check inline candidates within GT_RET_EXPR nodes for async calls
  • Updated lambda capture from [] to [=] to enable the recursive member function call

@jakobbotsch jakobbotsch marked this pull request as ready for review February 17, 2026 11:40
@jakobbotsch
Copy link
Member Author

cc @dotnet/jit-contrib PTAL @EgorBo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI runtime-async

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bad async codegen for Microsoft_Extensions_Caching_Abstractions_Microsoft_Extensions_Caching_Memory_CacheExtensions::GetOrCreateAsync

2 participants