]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Update retroactive comments from GH-117741 (segfault in `FutureIter_dealloc`) (GH...
authorSavannah Ostrowski <savannahostrowski@gmail.com>
Fri, 12 Jul 2024 08:34:30 +0000 (01:34 -0700)
committerGitHub <noreply@github.com>
Fri, 12 Jul 2024 08:34:30 +0000 (10:34 +0200)
Address comments

Misc/NEWS.d/3.13.0b1.rst
Modules/_asynciomodule.c

index 831ba623765df71c294a66f59c72ef7b4108624f..ba3b3dbbc08c415c4c83248423cb91d0bb0a6a62 100644 (file)
@@ -354,16 +354,6 @@ asend().throw()
 
 ..
 
-.. date: 2024-04-13-18-59-25
-.. gh-issue: 115874
-.. nonce: c3xG-E
-.. section: Core and Builtins
-
-Fixed a possible segfault during garbage collection of
-``_asyncio.FutureIter`` objects
-
-..
-
 .. date: 2024-04-13-16-55-53
 .. gh-issue: 117536
 .. nonce: xkVbfv
@@ -883,6 +873,16 @@ Alex Waygood.
 
 ..
 
+.. date: 2024-04-13-18-59-25
+.. gh-issue: 115874
+.. nonce: c3xG-E
+.. section: Library
+
+Fixed a possible segfault during garbage collection of
+``_asyncio.FutureIter`` objects. Patch by Savannah Ostrowski.
+
+..
+
 .. date: 2024-04-13-01-45-15
 .. gh-issue: 115060
 .. nonce: IxoM03
index 87ad236cdbb39f8ce807fa0c1433e85e9d80f550..6938aad90dd412979bc9c30bcd16074854427b04 100644 (file)
@@ -1650,7 +1650,6 @@ FutureIter_dealloc(futureiterobject *it)
 {
     PyTypeObject *tp = Py_TYPE(it);
 
-    // FutureIter is a heap type so any subclass must also be a heap type.
     assert(_PyType_HasFeature(tp, Py_TPFLAGS_HEAPTYPE));
 
     PyObject *module = ((PyHeapTypeObject*)tp)->ht_module;
@@ -1661,8 +1660,6 @@ FutureIter_dealloc(futureiterobject *it)
 
     // GH-115874: We can't use PyType_GetModuleByDef here as the type might have
     // already been cleared, which is also why we must check if ht_module != NULL.
-    // Due to this restriction, subclasses that belong to a different module
-    // will not be able to use the free list.
     if (module && _PyModule_GetDef(module) == &_asynciomodule) {
         state = get_asyncio_state(module);
     }