From 8694e4599702359568047c243639ce4326ce6118 Mon Sep 17 00:00:00 2001 From: Jan Vorlicek Date: Fri, 3 Oct 2025 20:59:23 +0200 Subject: [PATCH] Protect throwable around interpreted funclet call The InterpreterCodeManager::CallFunclet was not protecting the exceptionClauseArgs.throwable across the call to the interpreter. That lead to assert in some cases. This change fixes it. --- src/coreclr/vm/eetwain.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/coreclr/vm/eetwain.cpp b/src/coreclr/vm/eetwain.cpp index 5c8b653a3c3a8b..5f61acdfbc7b4d 100644 --- a/src/coreclr/vm/eetwain.cpp +++ b/src/coreclr/vm/eetwain.cpp @@ -2186,7 +2186,9 @@ DWORD_PTR InterpreterCodeManager::CallFunclet(OBJECTREF throwable, void* pHandle exceptionClauseArgs.isFilter = isFilter; exceptionClauseArgs.throwable = throwable; + GCPROTECT_BEGIN(exceptionClauseArgs.throwable); InterpExecMethod(&frames.interpreterFrame, &frames.interpMethodContextFrame, threadContext, &exceptionClauseArgs); + GCPROTECT_END(); frames.interpreterFrame.Pop();