[release/10.0] Fix g_gc_lowest_address updating - #131432
Open
janvorli wants to merge 1 commit into
Open
Conversation
Backport of dotnet#131324 to release/10.0
janvorli
temporarily deployed
to
copilot-pat-pool
July 27, 2026 17:52 — with
GitHub Actions
Inactive
janvorli
temporarily deployed
to
copilot-pat-pool
July 27, 2026 17:52 — with
GitHub Actions
Inactive
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @anicka-net, @dotnet/gc |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR backports a CoreCLR GC fix to release/10.0 to prevent g_gc_lowest_address from being incorrectly updated to 0 in a rare address-space edge case, which could cause GC to treat NULL references as heap references and crash.
Changes:
- Fixes an edge-condition comparison (
>→>=) when expanding the GC address range downward so the lowest address is clamped toOS_PAGE_SIZEinstead of becoming 0.
Member
|
@janvorli, it's approved. Please get code review and check test results after CI done. |
JulieLeeMSFT
approved these changes
Jul 27, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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 #131324 to release/10.0
Customer Impact
There is a rare issue that occurs when virtual memory blocks allocated by GC end up getting addresses that trigger a code path where the GC address space range maintained by GC in
g_gc_lowest_address..g_gc_highest_addressis expanded down and theg_gc_lowest_addressis exactly 2/3 of theg_gc_highest_address. We end up setting theg_gc_lowest_addressto 0This leads to crashes during GC because it starts considering NULL references as valid references being part of the GC heap.
Regression
Testing
Regular coreclr / libraries tests.
Risk
Low. The change just makes single condition correct for the edge case causing the issue.