Repository navigation
Commit 74e102a
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 7291b84 commit 74e102a
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 | |
|---|---|---|---|
| |||
3602 | 3602 | | |
3603 | 3603 | | |
3604 | 3604 | | |
3605 | | - | |
| 3605 | + | |
| 3606 | + | |
3606 | 3607 | | |
3607 | 3608 | | |
3608 | 3609 | | |
| 3610 | + | |
3609 | 3611 | | |
3610 | 3612 | | |
3611 | 3613 | | |
| |||
0 commit comments