mirror of
https://github.com/python/cpython
synced 2026-09-28 03:33:18 +03:00
[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 2402715e10)
Co-authored-by: Sam Gross <colesbury@gmail.com>
This commit is contained in:
parent
098eec9a15
commit
846cfb9a67
2 changed files with 4 additions and 1 deletions
|
|
@ -0,0 +1,2 @@
|
|||
Fix race condition in free-threaded build where :meth:`list.extend` could expose
|
||||
uninitialied memory to concurrent readers.
|
||||
Loading…
Add table
Add a link
Reference in a new issue