-
Notifications
You must be signed in to change notification settings - Fork 5k
[release/9.0-staging] NativeAOT/Arm64: Do not overwrite gcinfo tracking registers for TLS #112549
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
Conversation
@dotnet/jit-contrib @jeffschwMSFT |
There was a problem hiding this 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
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
@kunalspathak please take a look at the PR failures. we can merge when ready |
@jeffschwMSFT - this should be ready to merge. Thanks! |
go for it, I just hit the rebase button. the *-stagging branches are open to all committers to merge :) |
This reverts commit 269225f.
…rt/pr-112469-to-release/9.0-staging
@jeffschwMSFT - any idea how to make |
not sure everything looks in order, merged |
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.