[Python-bugs-list] [ python-Bugs-770997 ] memory leak in pickle/cPickle [2.2.3]
SourceForge.net
noreply@sourceforge.net
Mon, 14 Jul 2003 08:07:30 -0700
Bugs item #770997, was opened at 2003-07-14 10:07
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=770997&group_id=5470
Category: Python Library
Group: Python 2.2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Michael McCandless (mikemccand)
Assigned to: Nobody/Anonymous (nobody)
Summary: memory leak in pickle/cPickle [2.2.3]
Initial Comment:
Smallest case I could come up with:
import cPickle
import random
while 1:
s = str(random.randint(1000000, 9999999))
a = cPickle.dumps(s)
cPickle.loads(a)
The leak happens in these cases:
* Python 2.2.2 on FreeBSD 5.0.
* Python 2.2.3 on WinXP.
* Whether you use pickle or cPickle.
The leak does NOT happen:
* With Python 2.3b2 on FreeBSD 5.0 (maybe
this is a dup of a bug fixed on 2.3b2 --
can we back-port the fix?)
* If you use binary pickling (change to
"a = cPickle.dumps(s, 1)" instead).
* If you only call "dumps" or only call "loads";
somehow, it takes both to leak.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=770997&group_id=5470