From 843abc95363b3caa7d792b3bccc868dc9398fab2 Mon Sep 17 00:00:00 2001 From: Jan Vorlicek Date: Thu, 4 Dec 2025 00:44:54 +0100 Subject: [PATCH] Fix FrameDataAllocator popping in InterpreterFrame::ExceptionUnwind The InterpreterFrame::ExceptionUnwind_Impl was passing a wrong topmost frame to the frameDataAllocator.PopInfo - the one read directly from the m_pTopInterpMethodContextFrame which is not always up to date. The correct way is to use the call to GetTopInterpMethodContextFrame to get it. It was leading to the following assert in some libraries tests: assert(pCurrent == pFirst && pCurrent->pFramePos == pCurrent->pFrameStart) --- src/coreclr/vm/frames.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/vm/frames.cpp b/src/coreclr/vm/frames.cpp index f6c9b95863bbfd..11b48a3f227908 100644 --- a/src/coreclr/vm/frames.cpp +++ b/src/coreclr/vm/frames.cpp @@ -1985,7 +1985,7 @@ void InterpreterFrame::ExceptionUnwind_Impl() Thread *pThread = GetThread(); InterpThreadContext *pThreadContext = pThread->GetInterpThreadContext(); - InterpMethodContextFrame *pInterpMethodContextFrame = m_pTopInterpMethodContextFrame; + InterpMethodContextFrame *pInterpMethodContextFrame = GetTopInterpMethodContextFrame(); // Unwind the interpreter frames belonging to the current InterpreterFrame. while (pInterpMethodContextFrame != NULL)