[Python-bugs-list] [ python-Bugs-462710 ] Python 2.2a3/XML leaks memory

noreply@sourceforge.net noreply@sourceforge.net
Wed, 19 Sep 2001 14:10:01 -0700


Bugs item #462710, was opened at 2001-09-18 16:56
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=462710&group_id=5470

Category: XML
Group: Python 2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Jeffrey Chang (jchang)
>Assigned to: Martin v. Löwis (loewis)
Summary: Python 2.2a3/XML leaks memory

Initial Comment:
I'm running Python 2.2a3 on solaris 2.6 with expat 1.2.  The following bit
of code leaks a ton of memory.  Within 5 seconds, it's used up 50Mb of
memory.
    
--------
from xml import sax
from xml.sax import handler

print sax.make_parser().__doc__

while 1:
    parser = sax.make_parser()
    parser.setContentHandler(handler.ContentHandler())
    parser.feed("<TEST>hello!</TEST>")
--------


Python 2.1 in the same environment seems to leak little or no memory.

I tried compiling Python 2.2a3 with an older version of pyexpat, 1.45 (the one that comes with Python 2.1) and using Python 2.1's xml package, but it still leaks.

The problem may be somewhere outside the XML package.  I looked through the release notes for 2.2, but could find nothing obvious.

This seems to be different from bug #416288 "infrequent memory leak in pyexpat", in that it leaks memory quite severely and not on an exceptional error condition.

Thanks,
Jeff




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

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