From bf344933c454d44a11b1b17cc51de47a7c9b036b Mon Sep 17 00:00:00 2001 From: Jan Vorlicek Date: Thu, 15 Jan 2026 23:36:09 +0100 Subject: [PATCH] Fix interpreter threadabort in finally This fixes the System.Runtime.Tests.ControlledExecutionTests.CancelItselfFromFinally libraries test that was failing with the interpreter. The issue was that finally block was being aborted due to the fact that instead of the complex COMPlusCheckForAbort, the interpreter was only checking if abort was requested. --- src/coreclr/vm/interpexec.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coreclr/vm/interpexec.cpp b/src/coreclr/vm/interpexec.cpp index b158abf2bbb78f..208b4d83b935ff 100644 --- a/src/coreclr/vm/interpexec.cpp +++ b/src/coreclr/vm/interpexec.cpp @@ -4219,8 +4219,8 @@ do \ pInterpreterFrame->SetIsFaulting(false); - Thread *pThread = GetThread(); - if (pThread->IsAbortRequested()) + void* abortAddress = COMPlusCheckForAbort(resumeIP); + if (abortAddress != NULL) { // Record the resume IP in the pFrame so that the exception handling unwinds from there pFrame->ip = ip;