Repository navigation
Delete CodeHeapReserveForJumpStubs - #135411
Conversation
With the new precode design, we do not need to guarantee jumpstubs allocation succeeds anymore. All jump stub allocation can retry in the very rare case we are not able to find memory for the jump stub in the right range.
|
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. |
|
Tagging subscribers to this area: @agocke |
There was a problem hiding this comment.
🟡 Changes recommended
The jump-stub design document still describes the removed settings and fatal failure behavior.
1 open finding
What changed in this PR
Reworks jump-stub allocation failures to retry instead of relying on reserved code-heap space or fatal range-specific OOM handling.
Changes:
- Removes jump-stub heap reservations, configuration switches, and dedicated OOM resources.
- Propagates allocation failure as
NULLso JIT compilation can retry. - Adds AMD64 dynamic-helper emission retries at new addresses.
| File | Description |
|---|---|
src/coreclr/vm/threads.h |
Removes a redundant access specifier. |
src/coreclr/vm/jitinterface.cpp |
Adapts relocation handling to nullable jump-stub allocation. |
src/coreclr/vm/dynamicmethod.cpp |
Returns failure for unsatisfied ranged allocations. |
src/coreclr/vm/codeman.h |
Simplifies allocation state and jump-stub APIs. |
src/coreclr/vm/codeman.cpp |
Removes reservations and fatal range-OOM handling. |
src/coreclr/vm/amd64/cgencpu.h |
Updates the AMD64 relocation helper contract. |
src/coreclr/vm/amd64/cgenamd64.cpp |
Retries dynamic-helper emission after allocation failure. |
src/coreclr/pal/src/map/virtual.cpp |
Updates executable-memory reservation commentary. |
src/coreclr/inc/clrconfigvalues.h |
Removes obsolete jump-stub settings. |
src/coreclr/dlls/mscorrc/resource.h |
Removes the range-OOM resource identifier. |
src/coreclr/dlls/mscorrc/mscorrc.rc |
Removes the corresponding error message. |
src/coreclr/debug/daccess/fntableaccess.h |
Keeps the diagnostic heap-layout mirror synchronized. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
pcshrosbree
left a comment
There was a problem hiding this comment.
Built Checked clr and the readytorun tests on linux-x64 at e8fae2e. All 24 pass on this head and the merge-base, with and without DOTNET_ForceRelocs=1. With injected jump-stub failures, every dynamic-helper retry moved to a new address and ended within about 1 KB.
Co-authored-by: Aaron R Robinson <arobins@microsoft.com>
|
/azp run runtime-coreclr r2r-extra |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
/ba-g failure is known issue #132291 |

With the new precode design, we do not need to guarantee jumpstubs allocation succeeds anymore. All jump stub allocation can retry in the very rare case we are not able to find memory for the jump stub in the right range.