[release/9.0-staging] NativeAOT/Arm64: Do not overwrite gcinfo tracking registers for TLS#112549
Merged
jeffschwMSFT merged 7 commits intorelease/9.0-stagingfrom Mar 6, 2025
Conversation
Contributor
|
@dotnet/jit-contrib @jeffschwMSFT |
Open
3 tasks
amanasifkhalid
approved these changes
Feb 14, 2025
jeffschwMSFT
approved these changes
Feb 14, 2025
Member
jeffschwMSFT
left a comment
There was a problem hiding this comment.
lgtm. we will take for consideration in 9.0.x
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
Member
|
@kunalspathak please take a look at the PR failures. we can merge when ready |
Contributor
|
@jeffschwMSFT - this should be ready to merge. Thanks! |
Member
|
go for it, I just hit the rebase button. the *-stagging branches are open to all committers to merge :) |
3 tasks
3 tasks
This reverts commit 269225f.
…rt/pr-112469-to-release/9.0-staging
Contributor
|
@jeffschwMSFT - any idea how to make |
Member
|
not sure everything looks in order, merged |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #112469 to release/9.0-staging
/cc @kunalspathak
Customer Impact
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
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.