Skip to content

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

Merged
svick merged 8 commits into
release/10.0from
backport/pr-128455-to-release/10.0
Jun 9, 2026
Merged

[release/10.0] Fix NativeAOT string GC config handling#128894
svick merged 8 commits into
release/10.0from
backport/pr-128455-to-release/10.0

Conversation

@github-actions

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

Copy link
Copy Markdown
Contributor

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.

@janvorli

janvorli commented Jun 3, 2026

Copy link
Copy Markdown
Member

@MichalStrehovsky can you please review this backport?

@MichalStrehovsky

Copy link
Copy Markdown
Member

/azp run runtime-nativeaot-outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@rbhanda rbhanda modified the milestones: 10.0.x, 10.0.10 Jun 8, 2026
@svick
svick merged commit 5ffb31d into release/10.0 Jun 9, 2026
144 of 147 checks passed
@svick
svick deleted the backport/pr-128455-to-release/10.0 branch June 9, 2026 15:01
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants