Skip to content

[release/11.0] JIT: Exclude byref-like structs from async continuation capture - #136166

Open
EgorBo wants to merge 2 commits into
dotnet:release/11.0from
EgorBo:backport-136085-release-11.0
Open

EgorBo wants to merge 2 commits into
dotnet:release/11.0from
EgorBo:backport-136085-release-11.0

Conversation

@EgorBo

@EgorBo EgorBo commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Fixes Issue #136000

main PR #136085

Description

Backport of #136085 to release/11.0. Exclude byref-like structs from async continuation capture even when they contain no byrefs, as required by the runtime-async specification. The original regression test is placed under the release branch's existing merged runner.

Customer Impact

  • Customer reported
  • Found internally

Applications using runtime-async can suffer GC corruption and fatal crashes when a byref-like local containing object references is captured into a reused continuation without write barriers. Reported with an interpolated string handler used for logging on Linux x64.

Regression

  • Yes
  • No

Affects the new runtime-async implementation in .NET 11. Reproduced on .NET 11 RC1 and RC2.

Testing

Test is backported.

Risk

Low. Extends the existing exclusion of stack-only locals from async continuation capture using the existing layout predicate. No change to non-async methods.

Note

PR description generated with GitHub Copilot.

…et#136085)

Backport to release/11.0. Place the original regression test in the release
branch's existing merged runner and register it in Regression_ro_2.csproj.

(cherry picked from commit 9a88a84)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 362440cb-6282-4636-8d33-5d2e543985c2
@EgorBo EgorBo added this to the 11.0.0 milestone Oct 20, 2026
@EgorBo EgorBo added Servicing-consider Issue for next servicing release review area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI labels Oct 20, 2026
@EgorBo
EgorBo deployed to copilot-pat-pool October 20, 2026 17:56 — with GitHub Actions Active
@EgorBo
EgorBo deployed to copilot-pat-pool October 20, 2026 17:56 — with GitHub Actions Active
@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.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 362440cb-6282-4636-8d33-5d2e543985c2
@EgorBo

EgorBo commented Oct 20, 2026

Copy link
Copy Markdown
Member Author

PTAL @jkotas backport of #136085

@jkotas

jkotas commented Oct 21, 2026

Copy link
Copy Markdown
Member

The new test is failing on Apple mobile in this PR and in main as well (#136000)

This branch was successfully deployed

1 active (outdated) deployment
copilot-pat-pool — bc4612b7 Deployed Oct 20, 2026 by EgorBo via conclusion #10837
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 Servicing-consider Issue for next servicing release review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants