[Lldb-commits] [lldb] [lldb][Windows] Cap the loader helper's one-thread timeout at 5s (PR #226171)

via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 24 07:00:12 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Charles Zablit (charles-zablit)

<details>
<summary>Changes</summary>

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.

---
Full diff: https://github.com/llvm/llvm-project/pull/226171.diff


1 Files Affected:

- (modified) lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp (+4-1) 


``````````diff
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 {

``````````

</details>


https://github.com/llvm/llvm-project/pull/226171


More information about the lldb-commits mailing list