[ python-Bugs-1491688 ] Pickle & schizofrenic classes don't match

SourceForge.net noreply at sourceforge.net
Fri May 19 17:51:20 CEST 2006


Bugs item #1491688, was opened at 2006-05-19 17:51
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=1491688&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: Extension Modules
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Ronald Oussoren (ronaldoussoren)
Assigned to: Nobody/Anonymous (nobody)
Summary: Pickle & schizofrenic classes don't match

Initial Comment:
The attached scripts causes infinite recursion on the C level resulting in a 
crash.

The script defines a subclass of object that throws an exception in its 
__reduce__ method.

This method is then uses as the value of a slot on a subclass of float. This 
subclass also defines a __class__ property that returns the __class__ of the 
value in its sole slot.

Finally an instance of the subclass of float is pickled. This results in 
infinite recursion. The problem goes away when __reduce__ doesn't raise 
an exception or when the __class__ property is removed.



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

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


More information about the Python-bugs-list mailing list