Repository navigation
Commit cc00fe4
copy_lock_held_untracked() asserted that the new empty dict was not
tracked by the GC without checking whether its allocation had failed,
so a debug build dereferenced NULL instead of raising MemoryError. This
affected dict.copy(), PyDict_Copy() and _PyDict_CopyAsDict(), which
type() uses for the class namespace.
(cherry picked from commit f9132f1)
Co-authored-by: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
1 parent 3ea0524 commit cc00fe4
3 files changed
Lines changed: 15 additions & 1 deletion
File tree
- Lib/test
- Misc/NEWS.d/next/Core_and_Builtins
- Objects
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
462 | 474 | | |
463 | 475 | | |
464 | 476 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4448 | 4448 | | |
4449 | 4449 | | |
4450 | 4450 | | |
4451 | | - | |
| 4451 | + | |
4452 | 4452 | | |
4453 | 4453 | | |
4454 | 4454 | | |
| |||
0 commit comments