-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Fix write barriers in NativeAOT #74325
Conversation
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
I am running a scenario that used to fail ~50% with this fix and there are no failures after 10 iterations. This issue was definitely responsible for most failures. |
so looks like this fix is specific for NativeAOT, but vanilla crossgen2 arm64 failures need further investigation? |
Sadly there were still quite a few failures when i left it run overnight. About 30 core dumps out of 108 rebuilds. |
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. Thanks!!
yes, this change would have no effect on CoreCLR |
/backport to release/7.0-rc1 |
Started backporting to release/7.0-rc1: https://github.com/dotnet/runtime/actions/runs/2906418073 |
@AntonLapounov backporting to release/7.0-rc1 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Patch format detection failed.
Error: The process '/usr/bin/git' failed with exit code 128 Please backport manually! |
Did you use Michal's repro or a different one? |
no, I just build a subset or coreclr in a loop, which uses the currently built crossgen2 to build other stuff. |
/backport to release/7.0 |
Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/2914545828 |
For ARM64, use unsigned address comparisons in write barriers. In the
INSERT_CHECKED_WRITE_BARRIER_CORE
macro use theccmp
instruction to optimize for the case when the destination belongs to the heap.For all architectures, make sure to exclude the
g_GCShadowEnd
,g_ephemeral_high
, andg_highest_address
upper bounds in the corresponding range checks. That is the current behavior on x64 except forg_GCShadowEnd
.Fixes #72645.