This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Pickle & schizofrenic classes don't match
Type: Stage:
Components: Extension Modules Versions: Python 2.4
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: ronaldoussoren, zseil
Priority: normal Keywords:

Created on 2006-05-19 15:51 by ronaldoussoren, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pickle-crash.py ronaldoussoren, 2006-05-19 15:51
Messages (5)
msg28574 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2006-05-19 15:51
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.

msg28575 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2006-05-19 16:24
Logged In: YES 
user_id=580910

I forgot to mention that this patch is present in 2.3.5 upto the current SVN head.
msg28576 - (view) Author: Ziga Seilnacht (zseil) * (Python committer) Date: 2006-05-19 17:35
Logged In: YES 
user_id=1326842

This is a duplicate of bug #931877.
Patch #1462488 should fix it.
msg28577 - (view) Author: Ziga Seilnacht (zseil) * (Python committer) Date: 2006-05-19 18:00
Logged In: YES 
user_id=1326842

This is a duplicate of bug #931877.
Patch #1462488 should fix it.
msg28578 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2006-05-19 18:29
Logged In: YES 
user_id=580910

That's indeed the same problem as this. 

I'm closing this bug.
History
Date User Action Args
2022-04-11 14:56:17adminsetgithub: 43380
2006-05-19 15:51:20ronaldoussorencreate