Commit 9716444
committed
Fix ExecuteAndWait with empty environment on Windows
CreateProcessW requires that the environemnt block to be always double
null-terminated even with an empty environemnt.
https://learn.microsoft.com/en-us/windows/win32/procthread/environment-variables
The attached test fails this way without the fix.
C:\Users\hiroshi\upstream\llvm-project\llvm\unittests\Support\ProgramTest.cpp(697): error: Value of: ExecutionFailed
Actual: true
Expected: false
Couldn't execute program 'C:\Users\hiroshi\upstream\llvm-project\build\unittests\Support\SupportTests.exe': The parameter is incorrect. (0x57)1 parent ba576d3 commit 9716444
File tree
2 files changed
+22
-0
lines changed- llvm
- lib/Support/Windows
- unittests/Support
2 files changed
+22
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
223 | 227 | | |
224 | 228 | | |
225 | 229 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
680 | 680 | | |
681 | 681 | | |
682 | 682 | | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
683 | 701 | | |
0 commit comments