[Python-Dev] refleak hunting fun!

Walter Dörwald walter at livinglogic.de
Mon Aug 18 03:12:18 EDT 2003


Michael Hudson wrote:

> Walter Dörwald <walter at livinglogic.de> writes:
> 
>>Michael Hudson wrote:
>>
>>>[...]
>>>
>>>>>test_codeccallbacks leaked 1107 references
>>>
>>>[...]
>>>
>>>>but there seem to be real leaks here.
>>>
>>>In a perverse kind of way, phew :-) Wouldn't want to have gone to all
>>>this effort to uncover *nothing* but a bunch of false alarms...
>>
>>I've fixed two of the leaks.
> 
> Cool.  Do you think that's it for real leaks in test_codeccallbacks?

All leaks in test_codeccallbacks are fixed now. Take a look at
http://styx.livinglogic.de/~walter/refleakhunt/reflog3.txt
which is the result of running the test suite with the patch at
http://styx.livinglogic.de/~walter/refleakhunt/unittest.diff
The only test_codeccallbacks test that seems to leak references
is test_callbacks() and this is the result of calling
codecs.register_error(), i.e. the refcount leak disappears when
the call to register_error() is moved out of the test method.

The other number that is worrying me is 
test_builtin.BuiltinTest.test_filter_subclasses() which is
probably the result of the recent changes for tuple, str
und unicode subclasses. I'm going to look into this tomorrow.

> [...]
>>
>>http://styx.livinglogic.de/~walter/reflog3.txt
>>
>>(This includes only unittest based tests)
> 
> Cool.  Is this from CVS head?  I thought a bunch of leaks in arrays
> had already been fixed.

Seems they have. The bad numbers from test_array are gone, so
it *was* an older checkout.

> [...]

Bye,
    Walter Dörwald




More information about the Python-Dev mailing list