Skip to content

Fix comments around static constructor memory - #105911

Merged
jkotas merged 2 commits into
dotnet:mainfrom
jkotas:delete-bad-comment
Aug 6, 2024
Merged

jkotas merged 2 commits into
dotnet:mainfrom
jkotas:delete-bad-comment

Conversation

@jkotas

@jkotas jkotas commented Aug 3, 2024 •

Copy link
Copy Markdown
Member

Delete unnecessary MemoryBarrier

Contributes to #81151

Delete unnecessary MemoryBarrier

Fixes dotnet#81151
@VSadov

VSadov commented Aug 3, 2024

Copy link
Copy Markdown
Member

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.

@VSadov VSadov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@VSadov

VSadov commented Aug 5, 2024

Copy link
Copy Markdown
Member

I think the asm stubs could be dealt with separately.

@jkotas
jkotas merged commit af5a23c into dotnet:main Aug 6, 2024
@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