Skip to content

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Sep 9, 2021

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.

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
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Sep 9, 2021
@ghost
Copy link

ghost commented Sep 9, 2021

Tagging subscribers to this area: @JulieLeeMSFT
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #58820 to release/6.0

/cc @BruceForstall

Customer Impact

Testing

Risk

Author: github-actions[bot]
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@BruceForstall
Copy link
Contributor

@tannergooding @dotnet/jit-contrib PTAL -- port of fix to release/6.0

@JulieLeeMSFT
Copy link
Member

CC @jeffschwMSFT for 6.0 backport.

@JulieLeeMSFT JulieLeeMSFT added this to the 6.0.0 milestone Sep 9, 2021
@jeffschwMSFT
Copy link
Member

Please fill in the customer impact and request a code review.

Copy link
Member

@tannergooding tannergooding left a comment

Choose a reason for hiding this comment

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

LGTM.

@BruceForstall
Copy link
Contributor

@jeffschwMSFT This is ready now

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.

@jeffschwMSFT jeffschwMSFT merged commit 614c782 into release/6.0 Sep 9, 2021
@akoeplinger akoeplinger deleted the backport/pr-58820-to-release/6.0 branch September 10, 2021 16:02
@ghost ghost locked as resolved and limited conversation to collaborators Oct 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants