-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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/6.0] Disable poisoning for large structs #61601
Conversation
For very large structs (> 64K in size) poisoning could end up generating instructions requiring larger local var offsets than we can handle. This hits IMPL_LIMIT that throws InvalidProgramException. Turn off poisoning for larger structs that require more than 16 movs to also avoid the significant code bloat by the singular movs. This is a less risky version of #61521 for backporting to .NET 6. Fix #60852
Tagging subscribers to this area: @JulieLeeMSFT Issue DetailsBackport of #61589 to release/6.0 /cc @jakobbotsch Customer ImpactTestingRisk
|
Co-authored-by: Andy Ayers <[email protected]>
Since it's disabled, there is nothing to check.
CC @jeffschwMSFT please consider this for .NET6 servicing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved. Let's take for consideration in 6.0.x
Backport of #61589 to release/6.0
/cc @jakobbotsch
Customer Impact
Code that uses large (> 64 KB) stack allocated structs without the .zeroinit bit may hit InvalidProgramException in debug mode in .NET 6. This is particularly the case for large stack allocated arrays in C++/CLI when the program is compiled without optimizations. Reported by a customer in #60852.
Regression
Yes, this is a .NET 6 regression introduced with the poisoning feature in #54685. The poisoning is a debug aid that puts a recognizable value into uninitialized variables so that developers will more easily notice uninitialized uses of these.
Testing
There is a regression test included.
Risk
Low, this disables the poisoning feature in cases that would hit the problem.