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

Comments

gh-100795: avoid unexpectedfreeaddrinfo after failedgetaddrinfo#101220

Merged
kumaraditya303 merged 4 commits intopython:mainfrom
sebres:fix-gh-100795
Jan 22, 2023
Merged

gh-100795: avoid unexpectedfreeaddrinfo after failedgetaddrinfo#101220
kumaraditya303 merged 4 commits intopython:mainfrom
sebres:fix-gh-100795

Conversation

@sebres
Copy link
Contributor

This is rebased#101010 to main.

Proposed PR fixes segfaultgh-100795 - avoid unexpectedfreeaddrinfo ifres becomes not NULL during invocation ofgetaddrinfo if it fails.
Previously this could cause double freeing and other hardly reproducible aftereffects, especially in multithreaded environment.

One could surely doreturn -1 instead ofres = NULL &goto fail (in second case), like in


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).

arhadthedev reacted with thumbs up emoji
fixes segfaultpythongh-100795 - avoid unexpected `freeaddrinfo` if `res` becomes not NULL during invocation of `getaddrinfo` if it fails
@bedevere-bot
Copy link

Most changes to Pythonrequire a NEWS entry.

Please add it using theblurb_it web app or theblurb command-line tool.

@arhadthedev
Copy link
Member

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
Copy link
ContributorAuthor

Thx!

I'll propose the news entry as a PR in your repo

Why? Can't you push directly to my branch?

git push https://github.com/sebres/cpython.git your-branch:fix-gh-100795

(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
Copy link
Member

Can't you push directly to my branch?

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.

sebres reacted with thumbs up emoji

…PMZf7.rstCo-authored-by: Oleg Iarygin <dralife@yandex.ru>
@gpsheadgpshead added needs backport to 3.10only security fixes needs backport to 3.11only security fixes type-crashA hard crash of the interpreter, possibly with a core dump labelsJan 22, 2023
@kumaraditya303kumaraditya303 merged commit5f08fe4 intopython:mainJan 22, 2023
@miss-islington
Copy link
Contributor

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

Copy link
Member

@gpsheadgpshead left a 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.

@gpsheadgpshead removed needs backport to 3.10only security fixes needs backport to 3.11only security fixes labelsJan 22, 2023
@bedevere-bot
Copy link

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

@bedevere-bot
Copy link

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJan 22, 2023
…rinfo` (pythonGH-101220)(cherry picked from commit5f08fe4)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 22, 2023
…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
Copy link
Contributor

I'm unsure that this PR is good, see my comment on the issue.

Oh sorry, I just merged it.

@kumaraditya303
Copy link
Contributor

I'll revert this, sorry@gpshead.

kumaraditya303 added a commit to kumaraditya303/cpython that referenced this pull requestJan 22, 2023
kumaraditya303 added a commit that referenced this pull requestJan 22, 2023
…ddrinfo` (#101220)" (#101238)Revert "gh-100795: avoid unexpected `freeaddrinfo` after failed `getaddrinfo` (#101220)"This reverts commit5f08fe4.
@sebres
Copy link
ContributorAuthor

I'm sure that this PR is good, see my comment on the issue.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@gpsheadgpsheadgpshead approved these changes

@arhadthedevarhadthedevarhadthedev left review comments

@kumaraditya303kumaraditya303kumaraditya303 approved these changes

Assignees

No one assigned

Labels

type-crashA hard crash of the interpreter, possibly with a core dump

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

6 participants

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

[8]ページ先頭

©2009-2026 Movatter.jp