]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-118561: Fix crash involving list.extend in free-threaded build (GH-118723...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 9 May 2024 19:14:47 +0000 (21:14 +0200)
committerGitHub <noreply@github.com>
Thu, 9 May 2024 19:14:47 +0000 (19:14 +0000)
commit846cfb9a67fa4bdb81cd482a4a9e41a089ea80b3
treeb70c91b748e78106dbf3406ecf28cbe461fe1129
parent098eec9a1549b39ca55cfd59a9432698bfa07773
[3.13] gh-118561: Fix crash involving list.extend in free-threaded build (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 2402715e10d00ef60fad2948d8461559d084eb36)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Misc/NEWS.d/next/Core and Builtins/2024-05-07-16-57-56.gh-issue-118561.wNMKVd.rst [new file with mode: 0644]
Objects/listobject.c