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 handling of collectible thread statics and GC #40671

Merged
merged 2 commits into from
Aug 11, 2020

Conversation

davidwrighton
Copy link
Member

  • NonGc Thread statics helper returns a ByRef, not a pointer for collectible statics
  • Tail-call to collectible function can in theory result in GC hole, patch up FramedMethodFrame to report methoddesc when possible
  • Add test coverage for collectible statics
  • Remove test coverage for converting thread static variable into byref and using that to keep alive the static data as it wasn't fully safe itself

Fixes #40538

- NonGc Thread statics helper returns a ByRef, not a pointer for collectible statics
- Tail-call to collectible function can in theory result in GC hole, patch up FramedMethodFrame to report methoddesc when possible
- Add test coverage for collectible statics
- Remove test coverage for converting thread static variable into byref and using that to keep alive the static data as it wasn't fully safe itself
@davidwrighton davidwrighton added area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI and removed area-crossgen2-coreclr labels Aug 11, 2020
@davidwrighton
Copy link
Member Author

@dotnet/jit-contrib I need someone from the JIT team to review my change to flowgraph.cpp here.

Copy link
Member

@AndyAyersMS AndyAyersMS left a comment

Choose a reason for hiding this comment

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

Jit changes look ok.

- Turns out it wasn't needed
Copy link
Member

@janvorli janvorli left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@davidwrighton davidwrighton merged commit c47a92d into dotnet:master Aug 11, 2020
@karelz karelz added this to the 5.0.0 milestone Aug 18, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
@davidwrighton davidwrighton deleted the byreflocalsOnLinuxFault branch April 20, 2021 17:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI area-VM-coreclr
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[GCStress] Loader/CollectibleAssemblies/ByRefLocals Assert failure: SanityCheck()
5 participants