[release/10.0] JIT: Use native sized indices in the backend for GetElement and WithElement #119172
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport of #118990 to release/10.0
Customer Impact
Potential bad codegen for methods that involve indexing SIMD vectors with non-constant indices. The JIT backend assumes a 64-bit normalized index while the JIT frontend leaves a 32-bit index. If the upper bits of the register containing the index end up being non-zero, then memory corruption or segfaults/AVs can occur.
Regression
Testing
Manual inspection of codegen of the method reported in #118974. Automatic testing of this problem is hard as the register containing the index almost always ends up normalized on x64 and arm64.
Risk
Low