Skip to content

Honor stack_limit in NativeAOT PromoteCarefully - #134506

Merged
jkotas merged 3 commits into
dotnet:mainfrom
am11:patch-61
Sep 24, 2026
Merged

jkotas merged 3 commits into
dotnet:mainfrom
am11:patch-61

Conversation

@am11

@am11 am11 commented Sep 23, 2026

Copy link
Copy Markdown
Member

NativeAOT skipped any interior pointer within the thread's recorded
stack bounds. Under QEMU, musl over-reports the main thread's stack, so
heap byrefs were never reported and went stale when the GC moved
objects. Also require the address to be above stack_limit, as CoreCLR
does.

Fixes #130999

@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Sep 23, 2026
@azure-pipelines

Copy link
Copy Markdown
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.

@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.

@am11

am11 commented Sep 23, 2026

Copy link
Copy Markdown
Member Author

@jkotas, could you PTAL.

LA64 failure is unrelated and seems intermittent, failed in other PRs as well (e.g. #134508, #134500, #134498]). cc @LuckyXu-HF, @shushanhf

Comment thread src/coreclr/nativeaot/Runtime/GcEnum.cpp Outdated
@jkotas
jkotas merged commit 8c2d0d4 into dotnet:main Sep 24, 2026
108 of 111 checks passed
@am11
am11 deleted the patch-61 branch September 24, 2026 09:36
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-NativeAOT-coreclr community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

t_currentThread == null assertion failure in NativeAOT threading under heavy emulation stress

2 participants