From b1e7b2c784dea87cfe50eb61c3fdde3614685693 Mon Sep 17 00:00:00 2001 From: David Wrighton Date: Fri, 5 Dec 2025 16:20:44 -0800 Subject: [PATCH] [clr-interp] Fix issue around compliance with the rules about lazy initialized basic block stack details - When we added support for basic blocks with undefined stacks to be initialized with a stack state via a backwards branch we missed the case of basic blocks which begin after a ret instruction This fixes the jit\Methodical\tailcall\test_implicit tests. --- src/coreclr/interpreter/compiler.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/coreclr/interpreter/compiler.cpp b/src/coreclr/interpreter/compiler.cpp index fe416738fa506e..bdd094b0378244 100644 --- a/src/coreclr/interpreter/compiler.cpp +++ b/src/coreclr/interpreter/compiler.cpp @@ -2271,6 +2271,9 @@ void InterpCompiler::CreateBasicBlocks(CORINFO_METHOD_INFO* methodInfo) // This is a ret instruction coming from the initial IL of a synchronized or async method. CreateLeaveChainIslandBasicBlocks(methodInfo, insOffset, GetBB(m_synchronizedOrAsyncPostFinallyOffset)); } + + // The instruction AFTER a ret is always a different basic block if it exists. + GetBB((int32_t)(ip - codeStart)); } break; case InlineString: