Open
JIT: Preserve evaluation order in GC bulk copies#133805
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 struct copy fault in GC bulk-copy helper
JIT: Preserve evaluation order in GC bulk copies
Sep 12, 2026
EgorBo
marked this pull request as ready for review
September 12, 2026 23:45
|
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.
🔵 Needs a closer look
Automated review does not establish sufficient confidence for approval.
Pull request overview
This pull request preserves evaluation order in JIT GC bulk-copy lowering and adds regression coverage.
Changes:
- Defers null checks until both addresses are evaluated.
- Keeps argument placement adjacent to the helper call.
- Adds six evaluation-order and exception regression cases.
File summaries
| File | Summary |
|---|---|
src/tests/JIT/Regression_ro_2/Runtime_133587.cs |
Adds regression tests for evaluation order and copy behavior. |
src/coreclr/jit/lower.cpp |
Adjusts GC bulk-copy lowering order. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
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.
GC bulk-copy lowering can fault on the destination before evaluating the source, skipping side effects or masking source exceptions. In
Unsafe.Add(ref dst, Index()) = GetSrc(),GetSrc()must run before the copy faults.GT_PUTARG_*nodes afterward so argument placement remains adjacent to the helper call.