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

[release/9.0] linux/arm64: Verify TLS resolver code #108564

Merged
merged 3 commits into from
Oct 9, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Oct 4, 2024

Backport of #108419 to release/9.0

/cc @kunalspathak

Customer Impact

  • Customer reported
  • Found internally

With this issue, a simple hello world application containing ThreadLocal will not work if it is compiled as a "single-file app" on linux/arm64

Regression

  • Yes
  • No

In #106052, we added logic to invoke a routine that returns the TLS resolver method's instruction stream which we verify if it is as expected and if not, turn off TLS optimization. However, for Single app case, the code that returns the TLS resolver method was itself returning incorrect result and when we dereferenced it, we hit segfault. The fix was to check if the TLS resolver method itself is accurate.

Testing

We verified this locally with the fix as well as double checking in gdb and it worked. Unfortunately, there is no linux-arm64 testing for single-file apps and @agocke is working on adding it.

Risk

Medium: This gets triggered very early during JITing any method that contains TLS code.

IMPORTANT: If this backport is for a servicing release, please verify that:

  • The PR target branch is release/X.0-staging, not release/X.0.

  • If the change touches code that ships in a NuGet package, you have added the necessary package authoring and gotten it explicitly reviewed.

Copy link
Contributor

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

@kunalspathak kunalspathak added the Servicing-consider Issue for next servicing release review label Oct 5, 2024
Copy link
Member

@jeffschwMSFT jeffschwMSFT left a comment

Choose a reason for hiding this comment

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

lgtm. please get a code review. we will take for consideration in 9 GA

@jeffschwMSFT jeffschwMSFT added this to the 9.0.0 milestone Oct 5, 2024
@kunalspathak
Copy link
Member

@davidwrighton PTAL

@jeffschwMSFT jeffschwMSFT added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Oct 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-VM-coreclr Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants