[issue36725] Reference leak regression with Python3.8a3

STINNER Victor report at bugs.python.org
Fri Apr 26 03:40:30 EDT 2019


STINNER Victor <vstinner at redhat.com> added the comment:

I wrote an unit test to be able to re-use regrtest memory leak hunter:

import unittest

def simpleFunction59():
    a = 1
    try:
        return a
    finally:
        return a

class Tests(unittest.TestCase):
    def test_bug(self):
        for _ in range(10):
            simpleFunction59()


I confirm that there is a leak:

$ ./python -m test -R 3:3 test_bug
...
test_bug leaked [10, 10, 10] references, sum=30
...

----------

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


More information about the Python-bugs-list mailing list