[ python-Bugs-770997 ] memory leak in pickle/cPickle [2.2.3]

SourceForge.net noreply at sourceforge.net
Wed Jun 1 13:36:55 CEST 2005


Bugs item #770997, was opened at 2003-07-14 17:07
Message generated for change (Comment added) made by birkenfeld
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=770997&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.2.3
>Status: Closed
>Resolution: Out of Date
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.


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

>Comment By: Reinhold Birkenfeld (birkenfeld)
Date: 2005-06-01 13:36

Message:
Logged In: YES 
user_id=1188172

Doesn't seem to occur in 2.3.5, or 2.4.1.

Closing as Out of Date.

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

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


More information about the Python-bugs-list mailing list