From b20f7492f10f382034247167c50d41cc8f916b84 Mon Sep 17 00:00:00 2001 From: Jakob Botsch Nielsen Date: Wed, 7 Jan 2026 12:57:25 +0100 Subject: [PATCH] JIT: Mark non-internal block as imported The JIT has some debug checking that validates that non-internal blocks are always marked `BBF_IMPORTED`. We introduce such a block in the async rewrite (it should not be internal due to debug info), so make sure we uphold that invariant. --- src/coreclr/jit/async.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/coreclr/jit/async.cpp b/src/coreclr/jit/async.cpp index e0e75bd3e120c6..1d395a01ddfb62 100644 --- a/src/coreclr/jit/async.cpp +++ b/src/coreclr/jit/async.cpp @@ -2016,6 +2016,8 @@ BasicBlock* AsyncTransformation::RethrowExceptionOnResumption(BasicBlock* if ((rethrowExceptionBB->Prev() == block) && !block->HasFlag(BBF_INTERNAL)) { rethrowExceptionBB->RemoveFlags(BBF_INTERNAL); + // Non-internal blocks must be marked imported + rethrowExceptionBB->SetFlags(BBF_IMPORTED); } BasicBlock* storeResultBB = m_comp->fgNewBBafter(BBJ_ALWAYS, resumeBB, true);