Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix comments around static constructor memory #105911

Merged
merged 2 commits into from
Aug 6, 2024

Conversation

jkotas
Copy link
Member

@jkotas jkotas commented Aug 3, 2024

Delete unnecessary MemoryBarrier

Contributes to #81151

Delete unnecessary MemoryBarrier

Fixes dotnet#81151
@VSadov
Copy link
Member

VSadov commented Aug 3, 2024

We also access the cctorMethodAddress in stubs like:

encoder.EmitLDR(encoder.TargetRegister.Arg2, encoder.TargetRegister.Arg3);

For completeness of the fix those should also be volatile reads.

Ideally that would be in C#, so less trouble with hand encoded assembly. Not sure what scenario uses those (Reflection?) and whether it would be noticeable if the stubs do not try to short-circuit and just call here unconditionally.

Copy link
Member

@VSadov VSadov left a comment

Choose a reason for hiding this comment

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

LGTM!

@VSadov
Copy link
Member

VSadov commented Aug 5, 2024

I think the asm stubs could be dealt with separately.

@jkotas jkotas merged commit af5a23c into dotnet:main Aug 6, 2024
88 checks passed
@jkotas jkotas deleted the delete-bad-comment branch August 6, 2024 02:39
@github-actions github-actions bot locked and limited conversation to collaborators Sep 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants