Skip to content

ilverify: allow ldsflda of initonly static fields outside the cctor - #135994

Open
lagudafuadtosin wants to merge 1 commit into
dotnet:mainfrom
lagudafuadtosin:fix-94090
Open

lagudafuadtosin wants to merge 1 commit into
dotnet:mainfrom
lagudafuadtosin:fix-94090

Conversation

@lagudafuadtosin

Copy link
Copy Markdown
Contributor

fixes #94090

drops the InitOnly check on ldsflda, same as ldflda (#57444), as suggested on #112081. stores are still checked.

tested: new FieldTests case fails on main, passes with the fix.

Matches how ldflda of initonly instance fields is handled until readonly references are verified (dotnet#57444). Stores to initonly static fields outside the cctor are still reported.
@github-actions github-actions Bot added the area-Tools-ILVerification Issues related to ilverify tool and IL verification in general label Oct 17, 2026
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Oct 17, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @dotnet/jit-contrib
See info in area-owners.md if you want to be subscribed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-Tools-ILVerification Issues related to ilverify tool and IL verification in general community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ILVerify incorrectly complains about use of initonly field outside of constructor+

1 participant