From 3504d512b94ee75e7d3c83e4c1445a5821dff263 Mon Sep 17 00:00:00 2001 From: David Wrighton Date: Thu, 7 Aug 2025 14:55:15 -0700 Subject: [PATCH] [clr-interp] Handle some forms of unboxing stub When encountering an UnboxingStub to execute, invoke it as a compiled method instead of as a interpreted one --- src/coreclr/vm/interpexec.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/vm/interpexec.cpp b/src/coreclr/vm/interpexec.cpp index 6fc1faeb0e5485..c76d3e5cba6fea 100644 --- a/src/coreclr/vm/interpexec.cpp +++ b/src/coreclr/vm/interpexec.cpp @@ -1973,7 +1973,7 @@ void InterpExecMethod(InterpreterFrame *pInterpreterFrame, InterpMethodContextFr pInterpreterFrame->SetTopInterpMethodContextFrame(pFrame); GCX_PREEMP(); // Attempt to setup the interpreter code for the target method. - if (targetMethod->IsIL() || targetMethod->IsNoMetadata()) + if ((targetMethod->IsIL() || targetMethod->IsNoMetadata()) && !targetMethod->IsUnboxingStub()) { targetMethod->PrepareInitialCode(CallerGCMode::Coop); }