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

[3.15] gh-159739: Protect list storage while reporting its size (GH-160196) by miss-islington · Pull Request #160363 · python/cpython · GitHub

Repository navigation

[3.15] gh-159739: Protect list storage while reporting its size (GH-160196) - #160363

Merged
JelleZijlstra merged 1 commit into
python:3.15from
miss-islington:backport-d98f2cb-3.15
Oct 22, 2026
Merged

JelleZijlstra merged 1 commit into
python:3.15from
miss-islington:backport-d98f2cb-3.15

Conversation

miss-islington commented Oct 22, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

On free-threaded builds, list.sizeof() reads an allocation header through an atomically loaded storage pointer. The list's owner can resize and free that storage between the load and the header read, producing invalid size data or an invalid memory read. Hold the list lock while inspecting the allocation. Backport to 3.15 and 3.14.
(cherry picked from commit d98f2cb)

Co-authored-by: Jelle Zijlstra jelle@openai.com

…nGH-160196)

On free-threaded builds, list.__sizeof__() reads an allocation header through an atomically loaded storage pointer. The list's owner can resize and free that storage between the load and the header read, producing invalid size data or an invalid memory read. Hold the list lock while inspecting the allocation. Backport to 3.15 and 3.14.
(cherry picked from commit d98f2cb)

Co-authored-by: Jelle Zijlstra <jelle@openai.com>
JelleZijlstra enabled auto-merge (squash) October 22, 2026 22:23
JelleZijlstra merged commit 74e102a into python:3.15 Oct 22, 2026
56 checks passed
miss-islington deleted the backport-d98f2cb-3.15 branch October 22, 2026 23:59
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.

3 participants


Back | FazBrowse Home | New Git URL