Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-100795: Don't call freeaddrinfo on failure.#101252

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@gpshead
Copy link
Member

@gpsheadgpshead commentedJan 23, 2023
edited by arhadthedev
Loading

When getaddrinfo returns an error, the output pointer is in an unknown state Don't call freeaddrinfo on it. See the issue for discussion and details with links to reasoning.Most libc getaddrinfo implementations never modify the output pointer unless they are returning success.

Co-authored-by: Sergey G. Brestergithub@sebres.de
Co-authored-by: Oleg Iaryginoleg@arhadthedev.net

This re-does the earlier merged and reverted PR with some additional comments.

When getaddrinfo returns an error, the output pointer is in an unknown stateDon't call freeaddrinfo on it.  See the issue for discussion and details withlinks to reasoning.  _Most_ libc getaddrinfo implementations never modify theoutput pointer unless they are returning success.Co-authored-by: Sergey G. Brester <github@sebres.de>Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
@gpsheadgpshead merged commitb724ac2 intopython:mainJan 23, 2023
@gpsheadgpshead deleted the bug/gh100795/getaddrinfo-res-free branchJanuary 23, 2023 23:03
@miss-islington
Copy link
Contributor

Thanks@gpshead for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry@gpshead, I had trouble checking out the3.11 backport branch.
Please retry by removing and re-adding the "needs backport to 3.11" label.
Alternatively, you can backport usingcherry_picker on the command line.
cherry_picker b724ac2fe7fbb5a7a33d639cad8e748f17b325e0 3.11

@gpsheadgpshead added needs backport to 3.11only security fixes and removed needs backport to 3.11only security fixes labelsJan 23, 2023
@miss-islington
Copy link
Contributor

Thanks@gpshead for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-101271 is a backport of this pull request to the3.10 branch.

@bedevere-botbedevere-bot removed the needs backport to 3.10only security fixes labelJan 23, 2023
@bedevere-bot
Copy link

GH-101272 is a backport of this pull request to the3.11 branch.

@bedevere-botbedevere-bot removed the needs backport to 3.11only security fixes labelJan 23, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJan 23, 2023
When getaddrinfo returns an error, the output pointer is in an unknown stateDon't call freeaddrinfo on it.  See the issue for discussion and details withlinks to reasoning.  _Most_ libc getaddrinfo implementations never modify theoutput pointer unless they are returning success.(cherry picked from commitb724ac2)Co-authored-by: Gregory P. Smith <greg@krypto.org>Co-authored-by: Sergey G. Brester <github@sebres.de>Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJan 23, 2023
When getaddrinfo returns an error, the output pointer is in an unknown stateDon't call freeaddrinfo on it.  See the issue for discussion and details withlinks to reasoning.  _Most_ libc getaddrinfo implementations never modify theoutput pointer unless they are returning success.(cherry picked from commitb724ac2)Co-authored-by: Gregory P. Smith <greg@krypto.org>Co-authored-by: Sergey G. Brester <github@sebres.de>Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
miss-islington added a commit that referenced this pull requestJan 23, 2023
When getaddrinfo returns an error, the output pointer is in an unknown stateDon't call freeaddrinfo on it.  See the issue for discussion and details withlinks to reasoning.  _Most_ libc getaddrinfo implementations never modify theoutput pointer unless they are returning success.(cherry picked from commitb724ac2)Co-authored-by: Gregory P. Smith <greg@krypto.org>Co-authored-by: Sergey G. Brester <github@sebres.de>Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
miss-islington added a commit that referenced this pull requestJan 23, 2023
When getaddrinfo returns an error, the output pointer is in an unknown stateDon't call freeaddrinfo on it.  See the issue for discussion and details withlinks to reasoning.  _Most_ libc getaddrinfo implementations never modify theoutput pointer unless they are returning success.(cherry picked from commitb724ac2)Co-authored-by: Gregory P. Smith <greg@krypto.org>Co-authored-by: Sergey G. Brester <github@sebres.de>Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@kumaraditya303kumaraditya303kumaraditya303 approved these changes

Assignees

@gpsheadgpshead

Labels

type-bugAn unexpected behavior, bug, or error

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@gpshead@miss-islington@bedevere-bot@kumaraditya303

[8]ページ先頭

©2009-2025 Movatter.jp