[issue38962] Reference leaks in subinterpreters

Pablo Galindo Salgado report at bugs.python.org
Tue Dec 3 17:02:04 EST 2019


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

This patch (which is wrong) fixes the reference issues:

diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index cce4783bc1..c354af18db 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -1276,6 +1276,7 @@ finalize_interp_clear(PyThreadState *tstate)
         _PyExc_Fini();
     }
 
+    PyGC_Collect();
     _PyGC_Fini(tstate);
 }


This suggests that the per-interpreter gc does not play well with the refleak checker.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38962>
_______________________________________


More information about the Python-bugs-list mailing list