-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[release/6.0] Fix incorrect SIMD temp allocation for Vector256 with AVX2 disabled #58850
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
Conversation
The NI_Vector256_GetElement intrinsic, in some situations, requires a stack temporary. With AVX2 disabled, this temporary was getting allocated as a TYP_SIMD16 instead of a TYP_SIMD32, leading to overwriting the local variable. Add a type argument to the temp variable allocation, and allocate the temp as the largest sized type required by any use. Fixes #58295
|
Tagging subscribers to this area: @JulieLeeMSFT Issue DetailsBackport of #58820 to release/6.0 /cc @BruceForstall Customer ImpactTestingRisk
|
|
@tannergooding @dotnet/jit-contrib PTAL -- port of fix to release/6.0 |
|
CC @jeffschwMSFT for 6.0 backport. |
|
Please fill in the customer impact and request a code review. |
tannergooding
left a comment
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.
LGTM.
|
@jeffschwMSFT This is ready now |
jeffschwMSFT
left a comment
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.
Backport of #58820 to release/6.0
/cc @BruceForstall
Customer Impact
Using the
Vector256<T>GetElement API on a machine with AVX but without AVX2 could, in some instances, lead to a corrupt stack frame and data corruption.Testing
Manual testing of the fix on the repro case, as well as SuperPMI asm diffs to determine other impact of the change, as well as standard PR CI testing.
Risk
Low.