[Python-bugs-list] [ python-Bugs-485152 ] memory leak in test_scope

noreply@sourceforge.net noreply@sourceforge.net
Thu, 06 Dec 2001 07:14:24 -0800


Bugs item #485152, was opened at 2001-11-24 11:45
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=485152&group_id=5470

Category: Python Interpreter Core
Group: Python 2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Neal Norwitz (nnorwitz)
Assigned to: Jeremy Hylton (jhylton)
Summary: memory leak in test_scope

Initial Comment:
test_scope leaks memory
see attached file for details

----------------------------------------------------------------------

>Comment By: Jeremy Hylton (jhylton)
Date: 2001-12-06 07:14

Message:
Logged In: YES 
user_id=31392

This one is strange!

I've attached a new file (smaller.py) that reproduces the
leak more quickly than test_scope.py.  I've been unable to
simplify further.  The leak seems to occur in the presence
of three things:

    - an installed trace function
    - a string format operation
    - a nested lambda that causes the string to be a cell



----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2001-12-06 07:08

Message:
Logged In: YES 
user_id=33168

Attached a new file that was built with
current CVS and w/o optimization so
the line #s should be good

----------------------------------------------------------------------

Comment By: Jeremy Hylton (jhylton)
Date: 2001-12-06 06:48

Message:
Logged In: YES 
user_id=31392

Weird.  The leak is reported in PyString_FormatString(),
which is called because of a string interpolation call in
test_scope:  "_%s__%s" % (klass.__name__, name).  That's the
only use of % on a string in the module.

Unfortunately, the line numbers in the Purify output don't
match the current CVS version of stringobject.c.  Neal--
Would it be hard to do a new run with the current CVS?


----------------------------------------------------------------------

Comment By: Tim Peters (tim_one)
Date: 2001-11-27 12:04

Message:
Logged In: YES 
user_id=31435

Assigned to Barry.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=485152&group_id=5470