Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 65feded

Browse filesBrowse files
Update retroactive comments from GH-117741 (segfault in FutureIter_dealloc) (GH-121638)
Address comments
1 parent e8c91d9 commit 65feded
Copy full SHA for 65feded

File tree

Expand file treeCollapse file tree

2 files changed

+10
-13
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+10
-13
lines changed

‎Misc/NEWS.d/3.13.0b1.rst

Copy file name to clipboardExpand all lines: Misc/NEWS.d/3.13.0b1.rst
+10-10Lines 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

Copy file name to clipboardExpand all lines: Modules/_asynciomodule.c
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1650,7 +1650,6 @@ FutureIter_dealloc(futureiterobject *it)
16501650
{
16511651
PyTypeObject *tp = Py_TYPE(it);
16521652

1653-
// FutureIter is a heap type so any subclass must also be a heap type.
16541653
assert(_PyType_HasFeature(tp, Py_TPFLAGS_HEAPTYPE));
16551654

16561655
PyObject *module = ((PyHeapTypeObject*)tp)->ht_module;
@@ -1661,8 +1660,6 @@ FutureIter_dealloc(futureiterobject *it)
16611660

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.