[3.14] gh-159739: Propagate fallback getaddrinfo allocation failures (GH-159984) #160100

Merged
miss-islington opened 2:03pm on October 21, 2026 wanted to merge 1 commit into python/cpython 3.14 from
backport-7c39e8f-3.14

Pull Request Overview

  • Opened on October 21, 2026
  • Status Merged
  • Commit count 1 with first commit October 21, 2026

Total Delta

0 Total Diff Delta

Open Days

Open 23 weekdays

Test Delta

0 Diff Delta in Test Files
Breakdown by Phase

How long has this pull request spent in each phase of its lifecycle?

Data pending calculation for pull request

Author avatar

[3.14] gh-159739: Propagate fallback getaddrinfo allocation failures (GH-159984)

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

Co-authored-by: Jelle Zijlstra [email protected]


  • Issue: gh-159739
    <!-- /gh-issue-number -->

PR was closed without comments.