Skip to content

Conversation

@janvorli
Copy link
Member

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.

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.
@janvorli janvorli added this to the 11.0.0 milestone Nov 26, 2025
@janvorli janvorli self-assigned this Nov 26, 2025
@janvorli janvorli requested review from BrzVlad and kg as code owners November 26, 2025 23:40
Copilot AI review requested due to automatic review settings November 26, 2025 23:40
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @BrzVlad, @janvorli, @kg
See info in area-owners.md if you want to be subscribed.

Copilot finished reviewing on behalf of janvorli November 26, 2025 23:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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) from CORINFO_ACCESS_GET to CORINFO_ACCESS_SET
  • Corrected the access flag for CEE_STSFLD (store static field) from CORINFO_ACCESS_GET to CORINFO_ACCESS_SET

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@janvorli
Copy link
Member Author

/ba-g the failure is an infra timeout during android build, unrelated to this change.

@jkotas jkotas merged commit 39ad112 into dotnet:main Nov 27, 2025
103 of 105 checks passed
@janvorli janvorli deleted the fix-getfieldinfo-access-flags branch November 27, 2025 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants