[Python-bugs-list] [ python-Bugs-466175 ] cPickle core dump
noreply@sourceforge.net
noreply@sourceforge.net
Fri, 28 Sep 2001 13:04:57 -0700
Bugs item #466175, was opened at 2001-09-28 12:52
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=466175&group_id=5470
Category: Extension Modules
Group: None
Status: Open
Resolution: None
Priority: 6
Submitted By: Jeremy Hylton (jhylton)
Assigned to: Jeremy Hylton (jhylton)
Summary: cPickle core dump
Initial Comment:
A cPickler Pickler() operating in fast mode, i.e. when
Pickler().fast =1, dumps core on recursive objects.
a = []
a.append(a)
p = cPickle.Pickler()
p.fast = 1
p.dump(a)
[segfault]
The fast flag indicates that pickle shouldn't keep
track of object it has seen before, so it gets caught
in an infinite loop if it hits a recursive object.
Jim worries that fixing the segfault will slow down the
fast mode, which is a big performance improvement. I
think it can be solved using the same trick that we use
for comparing and printing recursive objects like [[...]].
The approach is to use a simple counter to track
recursive calls. Only track objects previously seen
after the counter exceeds some threshhold.
----------------------------------------------------------------------
>Comment By: Guido van Rossum (gvanrossum)
Date: 2001-09-28 13:04
Message:
Logged In: YES
user_id=6380
Go for it. I take it this relates to a customer project?
Else why the priority 6?
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=466175&group_id=5470