Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions llvm/lib/Support/Windows/Program.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a test and create a PR on upstream LLVM.

// terminate with two nulls.
if ((*Env).size() == 0)
EnvBlock.push_back(0);
EnvBlock.push_back(0);
}

Expand Down
5 changes: 0 additions & 5 deletions llvm/unittests/CAS/OnDiskCASLoggerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,7 @@ TEST(OnDiskCASLoggerTest, MultiProcess) {
SmallVector<ProcessInfo> PIs;
for (int I = 0; I < 5; ++I) {
bool ExecutionFailed;
#ifndef _WIN32
auto PI = ExecuteNoWait(Executable, Argv, ArrayRef<StringRef>{}, {}, 0, &Error,
#else
// CreateProcessW will fail with zero-length env on Windows
auto PI = ExecuteNoWait(Executable, Argv, std::nullopt, {}, 0, &Error,
#endif
&ExecutionFailed);
ASSERT_FALSE(ExecutionFailed) << Error;
PIs.push_back(std::move(PI));
Expand Down