Skip to content

Support native PE TLS field access in the interpreter - #136315

Merged
BrzVlad merged 1 commit into
dotnet:mainfrom
BrzVlad:fix-interpreter-pe-tls
Oct 23, 2026
Merged

BrzVlad merged 1 commit into
dotnet:mainfrom
BrzVlad:fix-interpreter-pe-tls

Conversation

@BrzVlad

@BrzVlad BrzVlad commented Oct 22, 2026

Copy link
Copy Markdown
Member

The Windows Checked interpreter fails Test-TLS, MutualRecurThd-TLS, b07847, and b03689 with InvalidProgramException.

#133533 converted these .data tls tests to C++/CLI. #136183 then added the VM's native TLS field-address helper and removed the Checked-configuration skips, exposing the interpreter's missing CORINFO_FIELD_STATIC_TLS handling.

Move the init class handling so that it applies also to this new field access type. JIT has this handling shared for all the types as well

if (fieldInfo.fieldFlags & CORINFO_FLG_FIELD_INITCLASS)

The Windows Checked interpreter fails Test-TLS, MutualRecurThd-TLS, b07847, and b03689 with InvalidProgramException.

dotnet/runtime PR 133533 converted these .data tls tests to C++/CLI.
dotnet/runtime PR 136183 then added the VM's native TLS field-address helper and removed the Checked-configuration skips, exposing the
interpreter's missing CORINFO_FIELD_STATIC_TLS handling.

Move the init class handling so that it applies also to this new field access type. JIT has this handling shared for all the types as well https://github.com/dotnet/runtime/blob/ba82a213c43ce30bc3d81b9e39d0c3a996df6b1e/src/coreclr/jit/importer.cpp#L9888
@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, @BrzVlad, @janvorli
See info in area-owners.md if you want to be subscribed.

@BrzVlad

BrzVlad commented Oct 22, 2026

Copy link
Copy Markdown
Member Author

/azp run runtime-interpreter

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@jkotas

jkotas commented Oct 22, 2026

Copy link
Copy Markdown
Member

C++/CLI

We should not bother with fixing interpreter to work well for C++/CLI and other Windows-specific legacy features.

(I am ok with this PR since it is a very simple change, and not really C++/CLI specific.)

@janvorli janvorli 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, thank you!

@BrzVlad

BrzVlad commented Oct 23, 2026

Copy link
Copy Markdown
Member Author

/ba-g unrelated interpreter failures which will be addressed in follow up work

@BrzVlad
BrzVlad merged commit f563c7c into dotnet:main Oct 23, 2026
118 of 120 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants