Repository navigation
Commit ef35d82
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>
1 parent 09fad5d commit ef35d82
2 files changed
Lines changed: 4 additions & 1 deletion
File tree
- Misc/NEWS.d/next/Core_and_Builtins
- Objects
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3560 | 3560 | | |
3561 | 3561 | | |
3562 | 3562 | | |
3563 | | - | |
| 3563 | + | |
| 3564 | + | |
3564 | 3565 | | |
3565 | 3566 | | |
3566 | 3567 | | |
| 3568 | + | |
3567 | 3569 | | |
3568 | 3570 | | |
3569 | 3571 | | |
| |||
0 commit comments