Commit acda9f3
Fix a race condition on setting a type __bases__ attribute: the
internal function add_subclass() now gets the
PyTypeObject.tp_subclasses member after calling PyWeakref_NewRef()
which can trigger a garbage collection which can indirectly modify
PyTypeObject.tp_subclasses.
(cherry picked from commit f1c6ae3)
Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
1 parent 6111d5d commit acda9f3
File tree
2 files changed
+21
-11
lines changed- Misc/NEWS.d/next/Core and Builtins
- Objects
2 files changed
+21
-11
lines changedLines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6384 | 6384 | | |
6385 | 6385 | | |
6386 | 6386 | | |
6387 | | - | |
6388 | | - | |
| 6387 | + | |
| 6388 | + | |
| 6389 | + | |
6389 | 6390 | | |
6390 | | - | |
| 6391 | + | |
| 6392 | + | |
| 6393 | + | |
| 6394 | + | |
| 6395 | + | |
| 6396 | + | |
| 6397 | + | |
| 6398 | + | |
| 6399 | + | |
| 6400 | + | |
6391 | 6401 | | |
6392 | 6402 | | |
6393 | 6403 | | |
6394 | 6404 | | |
6395 | 6405 | | |
6396 | 6406 | | |
6397 | | - | |
6398 | | - | |
6399 | | - | |
6400 | | - | |
6401 | | - | |
6402 | | - | |
6403 | | - | |
6404 | | - | |
| 6407 | + | |
| 6408 | + | |
| 6409 | + | |
6405 | 6410 | | |
6406 | 6411 | | |
6407 | 6412 | | |
| |||
0 commit comments