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-staging] NativeAOT/Arm64: Do not overwrite gcinfo tracking registers for TLS #112549

Open
wants to merge 1 commit into
base: release/9.0-staging
Choose a base branch
from

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Feb 14, 2025

Backport of #112469 to release/9.0-staging

/cc @kunalspathak

Customer Impact

  • Customer reported
  • Found internally

We were wrongly reporting certain registers has gc references which would lead the GC would interpret the values as them as valid object addresses and enumerate over them. This would lead to an undefined behavior or crash. Although it is a rare occurrence and certain events need to line up in place (method's register requirements in given method, trigger of GC at the instruction where wrong registers are tracked, etc.), it is still a potential issue because it can lead to fatal crash and diagnosing that crash would take an area expert (hard to root cause).

Regression

  • Yes
  • No

In #97910, we started inlining TLS access for NativeAOT for linux/arm64 and the issue was introduced since then.

Testing

The failing test was reverified and the asmdiffs were studied to make sure that we are reporting the gc references correctly.

Risk

Low. This optimization is present in our mainline for almost a year now and was found from our internal tool just recently.

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Feb 14, 2025
Copy link
Contributor

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

@kunalspathak
Copy link
Member

@dotnet/jit-contrib @jeffschwMSFT

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. we will take for consideration in 9.0.x

@jeffschwMSFT jeffschwMSFT added the Servicing-consider Issue for next servicing release review label Feb 14, 2025
@jeffschwMSFT jeffschwMSFT added this to the 9.0.x milestone Feb 14, 2025
@jeffschwMSFT jeffschwMSFT added Servicing-approved Approved for servicing release and removed area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI labels Feb 14, 2025
@jeffschwMSFT jeffschwMSFT modified the milestones: 9.0.x, 9.0.4 Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Servicing-approved Approved for servicing release Servicing-consider Issue for next servicing release review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants