[Python-Dev] refleak hunting fun!
Walter Dörwald
walter at livinglogic.de
Fri Aug 15 17:36:30 EDT 2003
Michael Hudson wrote:
> Walter Dörwald <walter at livinglogic.de> writes:
>
>> Michael Hudson wrote:
>>
>>> [...]
>>>
>>>> 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?
I'll try to go through the list and see if I can find any other
leaks. test_callbacks() from the test is the next candidate, but
it *does* register callbacks, so the registry comes into play.
>> > [...]
>>
>>> In general (not sure about these tests) you want to run each test a
>>> few time to let things settle down before measuring the effect on
>>> gettotalrefcount().
>>
>>
>> I think I'll try that, but this will take ages to run.
>
>
> No kidding.
A job for the weekend. This leads to an idea: Maybe we should
set up a cronjob that runs the tests and publishes the results
somewhere on the web?
>> Meanwhile here is the result of my patch for the complete test
>> suite:
>>
>> http://styx.livinglogic.de/~walter/reflog3.txt
>>
>> (This includes only unittest based tests)
>
>
> Cool. Is this from CVS head?
Yes.
> I thought a bunch of leaks in arrays
> had already been fixed.
I'll do an update before I start the job for the weekend
just to be sure.
>> It would simplify hunting leaks if we separated tests that are
>> known to change the total refcount from the rest by moving
>> them to separate test methods or even test cases.
>
>
> Sure would!
>
> Not sure that's a trivial proposition, though.
It isn't, we should finish the unittest migration first.
Bye,
Walter Dörwald
More information about the Python-Dev
mailing list