FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-159739: Propagate fallback getaddrinfo allocation failures by jelle-openai · Pull Request #159984 · python/cpython · GitHub

Repository navigation

gh-159739: Propagate fallback getaddrinfo allocation failures - #159984

Merged
JelleZijlstra merged 1 commit into
python:mainfrom
jelle-openai:jelle/codex/gh-159739-fallback-getaddrinfo-errors
Oct 21, 2026
Merged

JelleZijlstra merged 1 commit into
python:mainfrom
jelle-openai:jelle/codex/gh-159739-fallback-getaddrinfo-errors

Conversation

jelle-openai commented Oct 20, 2026 •
edited
Loading

Copy link
Copy Markdown
Contributor

Propagate fallback getaddrinfo allocation failures. On builds using CPython's fallback getaddrinfo(), an allocation failure while constructing address results can return success with a null result, and the canonical-name path can ignore a helper error. socket.getaddrinfo() can then return an empty list, other callers can crash when they dereference the null result, and partially built address lists may leak. Set EAI_MEMORY, propagate helper errors, and keep the partial list available for cleanup.

Backport to 3.15 and 3.14.

JelleZijlstra added needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes labels Oct 20, 2026
JelleZijlstra enabled auto-merge (squash) October 21, 2026 18:47
JelleZijlstra merged commit 7c39e8f into python:main Oct 21, 2026
108 of 110 checks passed

Copy link
Copy Markdown

Thanks @jelle-openai for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15.
🐍🍒⛏🤖

bedevere-app Bot commented Oct 21, 2026

Copy link
Copy Markdown

GH-160099 is a backport of this pull request to the 3.15 branch.

bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Oct 21, 2026

bedevere-app Bot commented Oct 21, 2026

Copy link
Copy Markdown

GH-160100 is a backport of this pull request to the 3.14 branch.

bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Oct 21, 2026
JelleZijlstra pushed a commit that referenced this pull request Oct 22, 2026
…H-159984) (#160099)

On builds using CPython's fallback `getaddrinfo()`, an allocation failure while constructing address results can return success with a null result, and the canonical-name path can ignore a helper error. `socket.getaddrinfo()` can then return an empty list, other callers can crash when they dereference the null result, and partially built address lists may leak. Set `EAI_MEMORY`, propagate helper errors, and keep the partial list available for cleanup.
(cherry picked from commit 7c39e8f)

Co-authored-by: Jelle Zijlstra <jelle@openai.com>
JelleZijlstra pushed a commit that referenced this pull request Oct 22, 2026
…H-159984) (#160100)

On builds using CPython's fallback `getaddrinfo()`, an allocation failure while constructing address results can return success with a null result, and the canonical-name path can ignore a helper error. `socket.getaddrinfo()` can then return an empty list, other callers can crash when they dereference the null result, and partially built address lists may leak. Set `EAI_MEMORY`, propagate helper errors, and keep the partial list available for cleanup.
(cherry picked from commit 7c39e8f)

Co-authored-by: Jelle Zijlstra <jelle@openai.com>
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL