Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34.1k
Comments
gh-100795: avoid unexpectedfreeaddrinfo after failedgetaddrinfo#101220
gh-100795: avoid unexpectedfreeaddrinfo after failedgetaddrinfo#101220kumaraditya303 merged 4 commits intopython:mainfrom
freeaddrinfo after failedgetaddrinfo#101220Conversation
fixes segfaultpythongh-100795 - avoid unexpected `freeaddrinfo` if `res` becomes not NULL during invocation of `getaddrinfo` if it fails
bedevere-bot commentedJan 21, 2023
Most changes to Pythonrequire a NEWS entry. Please add it using theblurb_it web app or theblurb command-line tool. |
arhadthedev commentedJan 21, 2023
I'll propose the news entry as a PR in your repo afterhttps://github.com/sebres/cpython/tree/fix-gh-100795 gets cloned to my computer so I could branch off it. |
sebres commentedJan 21, 2023
Thx!
Why? Can't you push directly to my branch? (since the branch is obviously not protected and it is under PR, GH'd allow to write there, at least python's members should have write rights). But do what you consider to be right. Thanks again. |
arhadthedev commentedJan 21, 2023
Only members ofhttps://github.com/python can push to branches bound to PRs inhttps://github.com/python/cpython. I'm not a member, just a regular contributor. |
Misc/NEWS.d/next/Library/2023-01-21-16-50-22.gh-issue-100795.NPMZf7.rst OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
…PMZf7.rstCo-authored-by: Oleg Iarygin <dralife@yandex.ru>
miss-islington commentedJan 22, 2023
Thanks@sebres for the PR, and@kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11. |
gpshead left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I'm unsure that this PR is good, see my comment on the issue.
bedevere-bot commentedJan 22, 2023
GH-101236 is a backport of this pull request to the3.11 branch. |
bedevere-bot commentedJan 22, 2023
GH-101237 is a backport of this pull request to the3.10 branch. |
…rinfo` (pythonGH-101220)(cherry picked from commit5f08fe4)Co-authored-by: Sergey G. Brester <github@sebres.de>Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
…rinfo` (pythonGH-101220)(cherry picked from commit5f08fe4)Co-authored-by: Sergey G. Brester <github@sebres.de>Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
kumaraditya303 commentedJan 22, 2023
Oh sorry, I just merged it. |
kumaraditya303 commentedJan 22, 2023
I'll revert this, sorry@gpshead. |
… `getaddrinfo` (python#101220)"This reverts commit5f08fe4.
sebres commentedJan 22, 2023
I'm sure that this PR is good, see my comment on the issue. |
This is rebased#101010 to main.
Proposed PR fixes segfaultgh-100795 - avoid unexpected
freeaddrinfoifresbecomes not NULL during invocation ofgetaddrinfoif it fails.Previously this could cause double freeing and other hardly reproducible aftereffects, especially in multithreaded environment.
One could surely do
return -1instead ofres = NULL&goto fail(in second case), like incpython/Modules/socketmodule.c
Line 1095 in5ef90ee
but this way it is minimal invasive (more consistent, remains safe against some merges or future implementations expecting goto fail to free some other handles, etc).