[Python-Dev] [Python-checkins] Python Regression Test Failures refleak (101) (original) (raw)
Tim Peters tim.peters at gmail.com
Sun May 28 13:23:23 CEST 2006
- Previous message: [Python-Dev] Remove METH_OLDARGS?
- Next message: [Python-Dev] [Python-checkins] Python Regression Test Failures refleak (101)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[... a huge number of reference leaks reported ...]
FYI, I "reduced" the relatively simple test_bisect's leaks to this self-contained program:
libreftest = """ No actual doctests here. """
import doctest import gc
def main(): from sys import gettotalrefcount as trc for i in range(10): doctest.testmod() print trc() doctest.master = None gc.collect()
if name == "main": main()
Running that here in a debug build:
C:\Code\python\PCbuild>python_d blah.py 54867 54873 54879 54885 54891 54897 54903 54909 54915 54921
So it leaks 6 references per iteration, and merely invoking doctest.testmod() is all it takes to provoke it. Comment out the:
test_support.run_doctest(test_bisect, verbose)
line in test_bisect.py, and test_bisect stops leaking too (which isn't a trivial stmt: its doctests are a small part of test_bisect -- most of it isn't leaking).
What happens next isn't obvious to me -- nobody has touched doctest.py in over 2 weeks, so that's not the source of the problem. Alas, I won't have computer access for the next 13 hours or so, and have to leave this here for now.
FWIW, the biggest change that went in since that last "normal" refleak run is the new exception reworking, so that has to be a top suspect.
- Previous message: [Python-Dev] Remove METH_OLDARGS?
- Next message: [Python-Dev] [Python-checkins] Python Regression Test Failures refleak (101)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]