Skip to content

swift-inspect: clean up some of the code in WindowsRemoteProcess #70103

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
merged 1 commit into from
Dec 3, 2023

Conversation

compnerd
Copy link
Member

Add some vertical whitespace to the code ejection process. Alter the logic to clean up the memory allocation first, ignoring the error as the subsequent run will perform a new allocation and this will leak a fixed amount of memory without interrupting the process or use of the tool. No longer check the exit code of the thread as that is always guaranteed to be 0 as the module unloading path does not report any error code in the injected code (DLL).

Use the opportunity to do some simple renaming to improve the readability and create an overload for avoiding unnecessary ceremony around use of a shared constant.

@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

CC: @hjyamauchi

@compnerd
Copy link
Member Author

compnerd commented Dec 1, 2023

@swift-ci please test

@compnerd
Copy link
Member Author

compnerd commented Dec 1, 2023

@swift-ci please build toolchain Windows platform

@hjyamauchi hjyamauchi self-requested a review December 1, 2023 23:05
Add some vertical whitespace to the code ejection process.  Alter the
logic to clean up the memory allocation first, ignoring the error as the
subsequent run will perform a new allocation and this will leak a fixed
amount of memory without interrupting the process or use of the tool.
No longer check the exit code of the thread as that is always guaranteed
to be 0 as the module unloading path does not report any error code in
the injected code (DLL).

Use the opportunity to do some simple renaming to improve the
readability and create an overload for avoiding unnecessary ceremony
around use of a shared constant.
@compnerd
Copy link
Member Author

compnerd commented Dec 2, 2023

@swift-ci please test

@compnerd
Copy link
Member Author

compnerd commented Dec 2, 2023

@swift-ci please test Windows platform

@compnerd compnerd merged commit 18fa460 into swiftlang:main Dec 3, 2023
@compnerd compnerd deleted the remote branch December 3, 2023 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants