summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-07-12 09:00:09 (GMT)
committerGitHub <noreply@github.com>2024-07-12 09:00:09 (GMT)
commit15c875a57c0fc5acf97fa07fbb01030c97d39d71 (patch)
tree6778ee4066e5d466b81f1075126c881a27189c5c
parent35f7155bc39b8e5212b90a2ee96cb107b51e0e83 (diff)
downloadcpython-15c875a57c0fc5acf97fa07fbb01030c97d39d71.zip
cpython-15c875a57c0fc5acf97fa07fbb01030c97d39d71.tar.gz
cpython-15c875a57c0fc5acf97fa07fbb01030c97d39d71.tar.bz2
[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 65fededf9cc1780d5edbef8a6e0a7cf9bc15aea6) Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
-rw-r--r--Misc/NEWS.d/3.13.0b1.rst20
-rw-r--r--Modules/_asynciomodule.c3
2 files changed, 10 insertions, 13 deletions
diff --git a/Misc/NEWS.d/3.13.0b1.rst b/Misc/NEWS.d/3.13.0b1.rst
index ab5f24f..57d1af8 100644
--- a/Misc/NEWS.d/3.13.0b1.rst
+++ b/Misc/NEWS.d/3.13.0b1.rst
@@ -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
diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c
index a26714f..04b5fc5 100644
--- a/Modules/_asynciomodule.c
+++ b/Modules/_asynciomodule.c
@@ -1602,7 +1602,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;
@@ -1613,8 +1612,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);
}