JIT inline decisions might lead to StackOverflow during execution time #45186
Labels
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone
While working on the #45184 noticed interesting behaviour.
The following IL program would run with no issues.
Method
Main
is compiled down toDuring the program execution
Runtime_45090._00001000::AllocLocal
is called one at a time and the required stack size should not exceed two page sizes.However, if
AllocLocal
didn'tnoinlining
attribute, all the callees would be inlined intoMain
:increasing the required stack size to 2 Megabytes and causing the program to fail with
StackOverflow
during its execution.@dotnet/jit-contrib Should the JIT take into account the inlinee stack frame size (at least its rough estimate) when making inline decisions?
Inline.txt
NoInline.txt
category:cq
theme:inlining
skill-level:expert
cost:medium
The text was updated successfully, but these errors were encountered: