[issue44895] refleak test failure in test_exceptions

Irit Katriel report at bugs.python.org
Wed Sep 1 11:56:22 EDT 2021


Irit Katriel <iritkatriel at gmail.com> added the comment:

With your patch I don't see a leak for refleak.py, but I still see one for 

./python.exe -m test -R 3:3 test_exceptions -m test_no_hang_on_context_chain_cycle2 -m test_recursion_normalizing_infinite_exception -m test_recursion_in_except_handler -m test_recursion_normalizing_with_no_memory -F -j1

(once I remove the @skip on test_no_hang_on_context_chain_cycle2). 


However, if I make this change it looks better:


--- a/Lib/test/libregrtest/refleak.py
+++ b/Lib/test/libregrtest/refleak.py
@@ -90,8 +90,9 @@ def get_pooled_int(value):
     for i in rep_range:
         test_func()
 
-        dash_R_cleanup(fs, ps, pic, zdc, abcs)
-        support.gc_collect()
+        for i in range(3):
+            dash_R_cleanup(fs, ps, pic, zdc, abcs)
+            support.gc_collect()

----------

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


More information about the Python-bugs-list mailing list