gh-143249: Fix buffer leak when overlapped operation fails to start (OS-Windows)#143250
Merged
kumaraditya303 merged 8 commits intopython:mainfrom Jan 13, 2026
Merged
gh-143249: Fix buffer leak when overlapped operation fails to start (OS-Windows)#143250kumaraditya303 merged 8 commits intopython:mainfrom
kumaraditya303 merged 8 commits intopython:mainfrom
Conversation
This reverts commit 2508cfb.
Contributor
Author
Thanks for the review. I will add a suitable test case. |
picnixz
reviewed
Dec 28, 2025
picnixz
reviewed
Dec 28, 2025
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
kumaraditya303
approved these changes
Dec 29, 2025
|
Thanks @hyongtao-code for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Jan 13, 2026
…tart on windows (pythonGH-143250) (cherry picked from commit 103a384) Co-authored-by: Yongtao Huang <yongtaoh2022@gmail.com>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Jan 13, 2026
…tart on windows (pythonGH-143250) (cherry picked from commit 103a384) Co-authored-by: Yongtao Huang <yongtaoh2022@gmail.com>
|
GH-143795 is a backport of this pull request to the 3.14 branch. |
|
GH-143796 is a backport of this pull request to the 3.13 branch. |
thunder-coding
pushed a commit
to thunder-coding/cpython
that referenced
this pull request
Feb 15, 2026
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
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.
On Windows, some overlapped I/O operations leak buffers when they fail to start, notably in
WSASendTo(),WSARecvFrom(), andWSARecvFromInto().This change ensures that buffers are released on failure by clearing the overlapped state, following the same pattern used in other overlapped error paths. This issue is similar in nature to commit 5485085, which fixed related overlapped cleanup problems.
Python script for tracking leaks
Result without the patch
Result with the patch