[issue3514] pickle segfault with infinite loop in __getattr__
Erick Tryzelaar
report at bugs.python.org
Thu Aug 7 18:39:09 CEST 2008
Erick Tryzelaar <idadesub at users.sourceforge.net> added the comment:
> Guido van Rossum <guido at python.org> added the comment:
>
> Does this occur in 2.6 or 2.5?
It doesn't in python 2.5. The RuntimeError manages to get printed out.
I don't have 2.6 installed to test against at the moment. Here's the
equivalent code:
########################
import pickle
class Foo:
def __getattr__(self, key):
self.foo
f = open('foo.db', 'w')
foo = Foo()
pickle.dump(foo, f)
f.close()
f = open('foo.db', 'r')
pickle.load(f)
f.close()
########################
This also happens with cPickle.
----------
nosy: +idadesub
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3514>
_______________________________________
More information about the Python-bugs-list
mailing list