diff --git a/src/coreclr/interpreter/compiler.cpp b/src/coreclr/interpreter/compiler.cpp index 96fb5630c9cbd2..8c6ba6b0e5094e 100644 --- a/src/coreclr/interpreter/compiler.cpp +++ b/src/coreclr/interpreter/compiler.cpp @@ -2258,16 +2258,6 @@ void InterpCompiler::InitializeClauseBuildingBlocks(CORINFO_METHOD_INFO* methodI BADCODE("Invalid handler region in EH clause"); } - // Find and mark all basic blocks that are part of the try region. - for (uint32_t j = clause.TryOffset; j < (clause.TryOffset + clause.TryLength); j++) - { - InterpBasicBlock* pBB = m_ppOffsetToBB[j]; - if (pBB != NULL && pBB->clauseType == BBClauseNone) - { - pBB->clauseType = BBClauseTry; - } - } - InterpBasicBlock* pHandlerBB = GetBB(clause.HandlerOffset); // Find and mark all basic blocks that are part of the handler region. @@ -7474,6 +7464,11 @@ void InterpCompiler::GenerateCode(CORINFO_METHOD_INFO* methodInfo) } case CEE_LOCALLOC: CHECK_STACK(1); + if (m_pCBB->clauseType != BBClauseNone) + { + // Localloc inside a funclet is not allowed + BADCODE("CEE_LOCALLOC inside funclet"); + } #if TARGET_64BIT // Length is natural unsigned int if (m_pStackPointer[-1].type == StackTypeI4) diff --git a/src/coreclr/interpreter/compiler.h b/src/coreclr/interpreter/compiler.h index e0b3addb69bc86..d25181ae6ff027 100644 --- a/src/coreclr/interpreter/compiler.h +++ b/src/coreclr/interpreter/compiler.h @@ -293,7 +293,6 @@ enum InterpBBState enum InterpBBClauseType { BBClauseNone, - BBClauseTry, BBClauseCatch, BBClauseFinally, BBClauseFilter,