[llvm] Fix ExecuteAndWait with empty environment on Windows (PR #158719)

Hiroshi Yamauchi via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 15 14:06:29 PDT 2025


================
@@ -220,6 +220,10 @@ static bool Execute(ProcessInfo &PI, StringRef Program,
       llvm::append_range(EnvBlock, EnvString);
       EnvBlock.push_back(0);
     }
+    // If an empty environment (*Env is size zero), we need to
+    // terminate with two nulls.
+    if ((*Env).size() == 0)
----------------
hjyamauchi wrote:

Done

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


More information about the llvm-commits mailing list