Repository navigation
Fix access flags passed to getFieldInfo in interpreter - #122009
Merged
Merged
Conversation
The interpreter compiler incorrectly passes CORINFO_ACCESS_GET to the getFieldInfo for CEE_STSFLD and CEE_STFLD opcodes. That causes failure in one of the libraries tests that initializes BitConverter.IsLittleEndian field. This change puts in the correct CORINFO_ACCESS_SET flag.
Contributor
|
Tagging subscribers to this area: @BrzVlad, @janvorli, @kg |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug in the CoreCLR interpreter where incorrect access flags were passed to getFieldInfo for field store operations. The interpreter was incorrectly using CORINFO_ACCESS_GET (indicating a read operation) instead of CORINFO_ACCESS_SET (indicating a write operation) for the CEE_STFLD and CEE_STSFLD IL opcodes.
Key changes:
- Corrected the access flag for
CEE_STFLD(store instance field) fromCORINFO_ACCESS_GETtoCORINFO_ACCESS_SET - Corrected the access flag for
CEE_STSFLD(store static field) fromCORINFO_ACCESS_GETtoCORINFO_ACCESS_SET
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
jkotas
approved these changes
Nov 27, 2025
jkotas
enabled auto-merge (squash)
November 27, 2025 01:11
Member
Author
|
/ba-g the failure is an infra timeout during android build, unrelated to this change. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The interpreter compiler incorrectly passes CORINFO_ACCESS_GET to the getFieldInfo for CEE_STSFLD and CEE_STFLD opcodes. That causes failure in one of the libraries tests that initializes
BitConverter.IsLittleEndian field.
This change puts in the correct CORINFO_ACCESS_SET flag.