Skip to content

Conversation

@colesbury
Copy link
Contributor

@colesbury colesbury commented May 7, 2024

The list_preallocate_exact function did not zero initialize array contents. In the free-threaded build, this could expose uninitialized memory to concurrent readers between the call to list_preallocate_exact and the filling of the array contents with items.

The `list_preallocate_exact` function did not zero initialize array contents. In the free-threaded build, this could expose uninitialized memory to concurrent readers between the call to `list_preallocate_exact` and the filling of the array contents with items.
Copy link
Member

@corona10 corona10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

…e-118561.wNMKVd.rst Co-authored-by: Donghee Na <donghee.na92@gmail.com>
@colesbury colesbury added the needs backport to 3.13 bugs and security fixes label May 9, 2024
@colesbury colesbury enabled auto-merge (squash) May 9, 2024 18:31
@colesbury colesbury merged commit 2402715 into python:main May 9, 2024
@miss-islington-app
Copy link

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 9, 2024
…ld (pythonGH-118723) The `list_preallocate_exact` function did not zero initialize array contents. In the free-threaded build, this could expose uninitialized memory to concurrent readers between the call to `list_preallocate_exact` and the filling of the array contents with items. (cherry picked from commit 2402715) Co-authored-by: Sam Gross <colesbury@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented May 9, 2024

GH-118863 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label May 9, 2024
colesbury added a commit that referenced this pull request May 9, 2024
…ild (GH-118723) (#118863) The `list_preallocate_exact` function did not zero initialize array contents. In the free-threaded build, this could expose uninitialized memory to concurrent readers between the call to `list_preallocate_exact` and the filling of the array contents with items. (cherry picked from commit 2402715) Co-authored-by: Sam Gross <colesbury@gmail.com>
SonicField pushed a commit to SonicField/cpython that referenced this pull request May 10, 2024
…ld (python#118723) The `list_preallocate_exact` function did not zero initialize array contents. In the free-threaded build, this could expose uninitialized memory to concurrent readers between the call to `list_preallocate_exact` and the filling of the array contents with items.
@colesbury colesbury deleted the gh-118561-list-extend branch May 20, 2024 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants