Skip to content

[release/10.0] Fix NativeAOT string GC config handling#128894

Open
github-actions[bot] wants to merge 8 commits into
release/10.0from
backport/pr-128455-to-release/10.0
Open

[release/10.0] Fix NativeAOT string GC config handling#128894
github-actions[bot] wants to merge 8 commits into
release/10.0from
backport/pr-128455-to-release/10.0

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Jun 2, 2026

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

  • Yes
  • No

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.

janvorli and others added 8 commits June 2, 2026 12:57
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>
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @agocke, @dotnet/ilc-contrib
See info in area-owners.md if you want to be subscribed.

@janvorli janvorli self-assigned this Jun 2, 2026
@janvorli janvorli added the Servicing-consider Issue for next servicing release review label Jun 2, 2026
@janvorli janvorli added this to the 10.0.x milestone Jun 2, 2026
@JulieLeeMSFT
Copy link
Copy Markdown
Member

@janvorli, please get code review and check test results when finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-NativeAOT-coreclr Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants