[issue33930] Segfault with deep recursion into object().__dir__

Łukasz Langa report at bugs.python.org
Wed Aug 11 11:52:03 EDT 2021


Łukasz Langa <lukasz at langa.pl> added the comment:

Apparently we've got ourselves refleaks with the patches.

It doesn't always reproduce but put test_exceptions -R: in a loop in 3.10 and soon enough you'll get:

0:00:00 load avg: 4.47 Run tests sequentially
0:00:00 load avg: 4.47 [1/1] test_exceptions
beginning 9 repetitions
123456789
.........
test_exceptions leaked [2, 2, 2, 2] references, sum=8
test_exceptions leaked [2, 2, 2, 2] memory blocks, sum=8
test_exceptions failed (reference leak) in 59.6 sec

== Tests result: FAILURE ==

1 test failed:
    test_exceptions


It's much harder to reproduce on 3.9 and 3.8 because test_exceptions has fewer tests and at least on my MBP finishes twice as fast. I ran 3.9 in a loop for an hour and no refleak.

----------
resolution: fixed -> 
stage: resolved -> patch review
status: closed -> open
versions: +Python 3.10, Python 3.9

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


More information about the Python-bugs-list mailing list