Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/7.0-rc1] Don't track current field of state machines #74216

Merged
merged 1 commit into from
Aug 20, 2022

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Aug 19, 2022

Backport of #74111 to release/7.0-rc1

/cc @MichalStrehovsky

Customer Impact

If customer code has many yield return statements and the method also requires reflection dataflow analysis, the compiler would take a long time to analyze the method. This would look like a hang that is hard to troubleshoot (it can increase compilation times by tens of minutes). These hangs could be a support cost because they're not easy to root cause (no obvious crash with a printed stack trace that can be cheaply bucketed, etc.).

Testing

We found this in one of the libraries tests. The test now compiles in a reasonable amount of time. The change also passes all NativeAOT testing and all IL Linker unit tests (this issue was in a shared codebase with IL Linker and we made the fix there first).

Risk

The issue is in analysis of compiler-generated state machine that is a new feature in .NET 7. We have unit tests for the core scenarios and they all pass.

Copy link
Member

@jeffschwMSFT jeffschwMSFT left a comment

Choose a reason for hiding this comment

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

approved. once we have a green ci we can merge.

@jeffschwMSFT jeffschwMSFT merged commit 37193fd into release/7.0-rc1 Aug 20, 2022
@MichalStrehovsky MichalStrehovsky deleted the backport/pr-74111-to-release/7.0-rc1 branch August 20, 2022 07:14
@ghost ghost locked as resolved and limited conversation to collaborators Sep 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants