Skip to content

Conversation

@jakobbotsch
Copy link
Member

Structs with byrefs in them are considered dead on suspension. The spec requires these to be zeroed on resumption, so there is no need to capture them.

The check, however, did not account for implicit byrefs to such structs. Fix this case.

Fix #119615

…nsion

Structs with byrefs in them are considered dead on suspension. The spec
requires these to be zeroed on resumption, so there is no need to
capture them.

The check, however, did not account for implicit byrefs to such structs.
Fix this case.
Copilot AI review requested due to automatic review settings October 22, 2025 14:03
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 bug in the async liveness analysis where implicit byrefs to structs containing byrefs were incorrectly considered live at suspension points. According to the spec, structs with byrefs are zeroed on resumption, so they don't need to be captured.

Key Changes:

  • Split the liveness check logic to properly handle implicit byrefs to structs with byrefs
  • Ensure both explicit structs and implicit byref structs containing byrefs are treated as dead on suspension

@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 Oct 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.

@jakobbotsch
Copy link
Member Author

PTAL @dotnet/jit-contrib

@jakobbotsch jakobbotsch requested a review from a team October 23, 2025 07:17
@jakobbotsch jakobbotsch merged commit c413587 into dotnet:main Oct 23, 2025
112 of 114 checks passed
@jakobbotsch jakobbotsch deleted the fix-119615 branch October 23, 2025 12:04
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.

[RuntimeAsync] Live ref-like temps are seen crossing awaits in Debug/minopts codegen for IL that does not have that.

2 participants