[Lldb-commits] [lldb] [lldb][Windows] Cap the loader helper's one-thread timeout at 5s (PR #226171)
Charles Zablit via lldb-commits
lldb-commits at lists.llvm.org
Thu Sep 24 06:59:12 PDT 2026
https://github.com/charles-zablit created https://github.com/llvm/llvm-project/pull/226171
llvm/llvm-project#215593 replaced the 5s cap from llvm/llvm-project#213010 with `utility-expression-timeout / 2`. The
test suite sets that to 600s, so the `LoadLibrary` helper runs with every other inferior thread suspended for up to 300s.
A Swift concurrency inferior cannot finish the load single-threaded, so it waits for the whole budget before the "all threads" retry succeeds.
This fixes test timeouts in swiftlang.
>From 63029b0b7cb8e83a4c067094c2b10dc93752a30b Mon Sep 17 00:00:00 2001
From: Charles Zablit <c_zablit at apple.com>
Date: Thu, 24 Sep 2026 14:57:11 +0100
Subject: [PATCH] [lldb][Windows] Cap the loader helper's one-thread timeout at
5s
---
lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp b/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
index 924ce798433cfb..78e09e43b81e31 100644
--- a/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
+++ b/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
@@ -53,7 +53,10 @@ static uint32_t g_initialize_count = 0;
// Upper bound on the timeout used when running a utility expression with
// only one thread allowed to run.
static std::chrono::microseconds GetLoaderOneThreadTimeout(Process *process) {
- return std::chrono::microseconds(process->GetUtilityExpressionTimeout()) / 2;
+ constexpr std::chrono::seconds preferred(5);
+ return std::min<std::chrono::microseconds>(
+ preferred,
+ std::chrono::microseconds(process->GetUtilityExpressionTimeout()) / 2);
}
namespace {
More information about the lldb-commits
mailing list