Conversation
|
Azure Pipelines: 16 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @dotnet/runtime-infrastructure |
Co-authored-by: EgorBo <523221+EgorBo@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix Span<T>.get_Item intrinsic evaluation order issue
JIT: Preserve receiver-before-index evaluation for Span indexers
Sep 15, 2026
Member
|
PTAL @dotnet/jit-contrib almost no diffs |
|
Azure Pipelines: Successfully started running 5 pipeline(s). 11 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The reviewed changes address the evaluation-order issue and include regression coverage.
Pull request overview
This pull request fixes JIT evaluation-order handling for Span<T> and ReadOnlySpan<T> indexers.
Changes:
- Preserves the receiver while spilling the index.
- Adds regression coverage for evaluation order and exceptions.
File summaries
| File | Description |
|---|---|
src/tests/JIT/Regression_ro_2/Runtime_133963.cs |
Adds regression tests for both span types. |
src/coreclr/jit/importercalls.cpp |
Preserves receiver-before-index evaluation. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
This was referenced Sep 15, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Span<T>andReadOnlySpan<T>indexer expansion can spill the index before a side-effecting receiver, violating IL evaluation order and producing incorrect values or exceptions.