forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 354
🍒 [lldb][windows] fix environment handling in CreateProcessW setup #12015
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
adrian-prantl
merged 6 commits into
swiftlang:swift/release/6.3
from
charles-zablit:charles-zablit/lldb/windows/refactor-processlauncher-to-6.3
Dec 17, 2025
Merged
🍒 [lldb][windows] fix environment handling in CreateProcessW setup #12015
adrian-prantl
merged 6 commits into
swiftlang:swift/release/6.3
from
charles-zablit:charles-zablit/lldb/windows/refactor-processlauncher-to-6.3
Dec 17, 2025
+178
−102
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
charles-zablit
commented
Dec 16, 2025
- [NFC][lldb][windows] fully qualify references to MemoryRegionInfo llvm/llvm-project#169845
- [lldb][windows] fix environment handling in CreateProcessW setup llvm/llvm-project#168733
- [NFC][lldb][windows] refactor the creation of inherited handles llvm/llvm-project#170301
- [lldb][windows] fix a use before allocation crash llvm/llvm-project#170530
- [lldb][windows] fix copying instead of using a reference of STARTUPINFOW llvm/llvm-project#170653
- [NFC][lldb][windows] refactor the referencing of STARTUPINFOW llvm/llvm-project#170669
…vm#169845) (cherry picked from commit fb3bf5b)
…m#168733) This patch refactors and documents the setup of the `CreateProcessW` invocation in `ProcessLauncherWindows`. It's a dependency of llvm#168729. `CreateEnvironmentBufferW` now sorts the environment variable keys before concatenating them into a string. From [the `CreateProcess` documentation](https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessw): > An application must manually pass the current directory information to the new process. To do so, the application must explicitly create these environment variable strings, sort them alphabetically (because the system uses a sorted environment), and put them into the environment block. Typically, they will go at the front of the environment block, due to the environment block sort order. `GetFlattenedWindowsCommandStringW` now returns an error which will be surfaced, instead of failing silently. Types were converted to their wide equivalent (i.e appending `W` to them, see `STARTUPINFOEX`) since we are calling the `W` variant of `CreateProcess`. (cherry picked from commit 9edbf83)
…#170301) Co-authored-by: Saleem Abdulrasool <[email protected]> (cherry picked from commit 14ed982)
(cherry picked from commit 33a80a7)
…FOW (llvm#170653) (cherry picked from commit 5b87337)
Author
|
@swift-ci please test |
Author
|
@swift-ci please test windows |
1 similar comment
Author
|
@swift-ci please test windows |
adrian-prantl
approved these changes
Dec 17, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.