Skip to content

Commit 15c875a

Browse files
[3.13] Update retroactive comments from GH-117741 (segfault in FutureIter_dealloc) (GH-121638) (GH-121642)
Update retroactive comments from GH-117741 (segfault in `FutureIter_dealloc`) (GH-121638) Address comments (cherry picked from commit 65feded) Co-authored-by: Savannah Ostrowski <[email protected]>
1 parent 35f7155 commit 15c875a

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

Misc/NEWS.d/3.13.0b1.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -354,16 +354,6 @@ asend().throw()
354354

355355
..
356356
357-
.. date: 2024-04-13-18-59-25
358-
.. gh-issue: 115874
359-
.. nonce: c3xG-E
360-
.. section: Core and Builtins
361-
362-
Fixed a possible segfault during garbage collection of
363-
``_asyncio.FutureIter`` objects
364-
365-
..
366-
367357
.. date: 2024-04-13-16-55-53
368358
.. gh-issue: 117536
369359
.. nonce: xkVbfv
@@ -883,6 +873,16 @@ Alex Waygood.
883873

884874
..
885875
876+
.. date: 2024-04-13-18-59-25
877+
.. gh-issue: 115874
878+
.. nonce: c3xG-E
879+
.. section: Library
880+
881+
Fixed a possible segfault during garbage collection of
882+
``_asyncio.FutureIter`` objects. Patch by Savannah Ostrowski.
883+
884+
..
885+
886886
.. date: 2024-04-13-01-45-15
887887
.. gh-issue: 115060
888888
.. nonce: IxoM03

Modules/_asynciomodule.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1602,7 +1602,6 @@ FutureIter_dealloc(futureiterobject *it)
16021602
{
16031603
PyTypeObject *tp = Py_TYPE(it);
16041604

1605-
// FutureIter is a heap type so any subclass must also be a heap type.
16061605
assert(_PyType_HasFeature(tp, Py_TPFLAGS_HEAPTYPE));
16071606

16081607
PyObject *module = ((PyHeapTypeObject*)tp)->ht_module;
@@ -1613,8 +1612,6 @@ FutureIter_dealloc(futureiterobject *it)
16131612

16141613
// GH-115874: We can't use PyType_GetModuleByDef here as the type might have
16151614
// already been cleared, which is also why we must check if ht_module != NULL.
1616-
// Due to this restriction, subclasses that belong to a different module
1617-
// will not be able to use the free list.
16181615
if (module && _PyModule_GetDef(module) == &_asynciomodule) {
16191616
state = get_asyncio_state(module);
16201617
}

0 commit comments

Comments
 (0)