From 2f86103b0ae3f67a80820a5b5b175a428938136b Mon Sep 17 00:00:00 2001 From: Eduardo Velarde Date: Thu, 24 Sep 2026 11:32:37 -0700 Subject: [PATCH] Disable runtime thread reinitilization check on Apple platforms --- src/coreclr/vm/threads.cpp | 4 ++++ .../ThreadStateDestroyed/ThreadStateDestroyed.csproj | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/coreclr/vm/threads.cpp b/src/coreclr/vm/threads.cpp index e06b9300655136..f6fd26a4a74392 100644 --- a/src/coreclr/vm/threads.cpp +++ b/src/coreclr/vm/threads.cpp @@ -611,7 +611,11 @@ Thread* SetupThread() if ((pThread = GetThreadNULLOk()) != NULL) return pThread; +#ifndef TARGET_APPLE + // Disable the check on Apple platforms + // See https://github.com/dotnet/runtime/issues/134571 CheckThreadStateNotDestroyed(); +#endif // For interop debugging, we must mark that we're in a can't-stop region // b.c we may take Crsts here that may block the helper thread. diff --git a/src/tests/baseservices/threading/ThreadStateDestroyed/ThreadStateDestroyed.csproj b/src/tests/baseservices/threading/ThreadStateDestroyed/ThreadStateDestroyed.csproj index bd6b31acc80d27..d141302f1e0374 100644 --- a/src/tests/baseservices/threading/ThreadStateDestroyed/ThreadStateDestroyed.csproj +++ b/src/tests/baseservices/threading/ThreadStateDestroyed/ThreadStateDestroyed.csproj @@ -7,6 +7,8 @@ true true true + + true true