Proposition: Stack bending #4654
Labels
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
enhancement
Product code improvement that does NOT require public API changes/additions
hard-problem
Milestone
Currently standard call (simplified: no params) looks more or less like this in the assembly code:
Subroutine/Function:
Function call:
Currently by default we support stack of only 1MB size and there is no way of dynamically controlling the size.
My proposition is to allow local dynamic stack growing (without need to create a new thread).
How would that work - simplest example (+ some syntax sugar on top of that):
In this context a's code would have a completely new stack
calling a() would need to look something like this (let's assume stackEndAddress is at ebp+12, and function to call address at ebp+8) (sudo-asm):
This way you can fake resize stack dynamically within a certain context (so only when this is needed - i.e. you want to do some really complex graph analysis but you don't always want to pay cost for that). Of course some stack overflow protection would need to be added etc. etc.
category:proposal
theme:runtime
skill-level:expert
cost:extra-large
impact:small
The text was updated successfully, but these errors were encountered: