镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

JIT: Always clear references in async return values - #136830

Merged
jakobbotsch merged 1 commit into
dotnet:mainfrom
jakobbotsch:async-clear-unused-return-gc-refs
Nov 4, 2026
Merged

jakobbotsch merged 1 commit into
dotnet:mainfrom
jakobbotsch:async-clear-unused-return-gc-refs

Conversation

@jakobbotsch

Copy link
Copy Markdown
Member

We clear references after copying it to the user to avoid retaining objects in the return value. However, this code only ran when there was a user. Change the logic to always clear object references, regardless of whether there is a user.

Fixes #115686 (comment)

We clear references after copying it to the user to avoid retaining
objects in the return value. However, this code only ran when there was
a user. Change the logic to always clear object references, regardless
of whether there is a user.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2846cf7e-ff37-489b-a02c-246210e7fece
@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 Nov 2, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 5 pipeline(s).
10 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, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@jakobbotsch

Copy link
Copy Markdown
Member Author

cc @dotnet/jit-contrib PTAL @AndyAyersMS

Diffs. Size regressions which are expected.

@jakobbotsch
jakobbotsch merged commit e7d04da into dotnet:main Nov 4, 2026
131 checks passed
@jakobbotsch
jakobbotsch deleted the async-clear-unused-return-gc-refs branch November 4, 2026 07:39
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Nov 6, 2026
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[runtime-async] Consider optimizing continuations to avoid storing unused return values

2 participants