Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Fix reflection access to thread static fields #8219

Merged

Conversation

MichalStrehovsky
Copy link
Member

Reflection-accessing threadstatic fields didn't work.

I'm also deleting a bunch of .NET Native code that is not relevant to CoreRT.
The .NET Native approach to threadstatics (using TLS region) is Windows-specific
and not portable.

The type loader support is incomplete (the compiler side is ready but runtime side is
still going to fail with a MissingTemplateException). I got tired and this diff is already
too big.

Contributes to #5137.

Reflection-accessing threadstatic fields didn't work.

I'm also deleting a bunch of .NET Native code that is not relevant to CoreRT.
The .NET Native approach to threadstatics (using TLS region) is Windows-specific
and not portable.

The type loader support is incomplete (the compiler side is ready but runtime side is
still going to fail with a MissingTemplateException). I got tired and this diff is already
too big.

Contributes to dotnet#5137.
Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

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

Nice! Thank you

Usage based metadata manager assumes all fields on allocated types are used and therefore reflectable.
@MichalStrehovsky MichalStrehovsky merged commit 982329c into dotnet:master Jul 13, 2020
@MichalStrehovsky MichalStrehovsky deleted the threadStaticReflection branch July 13, 2020 08:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants