Author: Charles Zablit
Date: 2026-07-31T14:27:13+02:00
New Revision: c29bcd45ddd96c5d3ea0d5f7de051b5174966a3b

URL: 
https://github.com/llvm/llvm-project/commit/c29bcd45ddd96c5d3ea0d5f7de051b5174966a3b
DIFF: 
https://github.com/llvm/llvm-project/commit/c29bcd45ddd96c5d3ea0d5f7de051b5174966a3b.diff

LOG: [lldb][Windows] Don't cut the loader helper off after 250ms (#213010)

`LoadLibraryW` runs on the debuggee with a timeout of 250ms (the
default). On a loaded machine (in CI), this timeout is reached quite
often, causing tests failures.

This patch gives both loader helpers an explicit timeout of 5s (clamped
to half the overall timeout so the two stay consistent).

Added: 
    

Modified: 
    lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp 
b/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
index fdf6983801ae5..f471a957e8361 100644
--- a/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
+++ b/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
@@ -8,6 +8,7 @@
 
 #include "PlatformWindows.h"
 
+#include <chrono>
 #include <cstdio>
 #include <optional>
 #if defined(_WIN32)
@@ -422,6 +423,8 @@ uint32_t PlatformWindows::DoLoadImage(Process *process,
   // handle currently.
   options.SetTrapExceptions(false);
   options.SetTimeout(process->GetUtilityExpressionTimeout());
+  options.SetOneThreadTimeout(std::min<std::chrono::microseconds>(
+      std::chrono::seconds(5), process->GetUtilityExpressionTimeout() / 2));
   options.SetIsForUtilityExpr(true);
 
   ExpressionResults result =
@@ -932,6 +935,8 @@ extern "C" {
   // handle currently.
   options.SetTrapExceptions(false);
   options.SetTimeout(process->GetUtilityExpressionTimeout());
+  options.SetOneThreadTimeout(std::min<std::chrono::microseconds>(
+      std::chrono::seconds(5), process->GetUtilityExpressionTimeout() / 2));
 
   ExpressionResults result = UserExpression::Evaluate(
       context, options, expression, kLoaderDecls, value);


        
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to