This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author thehesiod
Recipients methane, thehesiod, yselivanov
Date 2017-07-31.20:19:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1501532382.03.0.168422060356.issue31061@psf.upfronthosting.co.za>
In-reply-to
Content
I'm hoping this is the fix:

--- Modules/_asynciomodule.c.orig	2017-07-31 12:16:16.000000000 -0700
+++ Modules/_asynciomodule.c	2017-07-31 13:08:52.000000000 -0700
@@ -953,15 +953,18 @@
 FutureObj_dealloc(PyObject *self)
 {
     FutureObj *fut = (FutureObj *)self;
+    PyObject_GC_UnTrack(self);
 
     if (Future_CheckExact(fut)) {
         /* When fut is subclass of Future, finalizer is called from
          * subtype_dealloc.
          */
+        _PyObject_GC_TRACK(self);
         if (PyObject_CallFinalizerFromDealloc(self) < 0) {
             // resurrected.
             return;
         }
+        _PyObject_GC_UNTRACK(self);
     }
 
     if (fut->fut_weakreflist != NULL) {
@@ -1828,14 +1831,18 @@
 {
     TaskObj *task = (TaskObj *)self;
 
+    PyObject_GC_UnTrack(self);
+
     if (Task_CheckExact(self)) {
         /* When fut is subclass of Task, finalizer is called from
          * subtype_dealloc.
          */
+         _PyObject_GC_TRACK(self);
         if (PyObject_CallFinalizerFromDealloc(self) < 0) {
             // resurrected.
             return;
         }
+        _PyObject_GC_UNTRACK(self);
     }
 
     if (task->task_weakreflist != NULL) {
History
Date User Action Args
2017-07-31 20:19:42thehesiodsetrecipients: + thehesiod, methane, yselivanov
2017-07-31 20:19:42thehesiodsetmessageid: <1501532382.03.0.168422060356.issue31061@psf.upfronthosting.co.za>
2017-07-31 20:19:42thehesiodlinkissue31061 messages
2017-07-31 20:19:41thehesiodcreate