[release/10.0] Fix NativeAOT string GC config handling#128894
Open
github-actions[bot] wants to merge 8 commits into
Open
[release/10.0] Fix NativeAOT string GC config handling#128894github-actions[bot] wants to merge 8 commits into
github-actions[bot] wants to merge 8 commits into
Conversation
The NativeAOT doesn't have real implementation of GCToEEInterface::GetStringConfigValue, the method just return false. That prevents extraction of settings that are strings, like GCHeapAffinitizeRanges. This change fixes it by adding proper implementation. Close #128396
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Contributor
|
Tagging subscribers to this area: @agocke, @dotnet/ilc-contrib |
JulieLeeMSFT
approved these changes
Jun 2, 2026
Member
|
@janvorli, please get code review and check test results when finished. |
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 #128455 to release/10.0
/cc @janvorli
Customer Impact
When publishing with NativeAOT (PublishAot=true), the GCHeapAffinitizeRanges configuration is ignored regardless of how it is supplied — RuntimeHostConfigurationOption in the .csproj, IlcArg --runtimeopt:, or the DOTNET_GCHeapAffinitizeRanges environment variable. The Server GC heap threads fall back to the default per-heap affinity (heap 0 → CPU 0, heap 1 → CPU 1, etc.) instead of the user-specified ranges. The same configuration works correctly in non-AOT builds.
Regression
Testing
Local testing using targeted repro app provided by the customer, local NativeAOT tests execution, CI.
Risk
Low, the change is specific to string config values handling in NativeAOT that was ignoring those before.