Facundo Batista <[EMAIL PROTECTED]> added the comment:
Confirmed in...
Python 2.6b1+ (trunk:65017M, Jul 16 2008, 13:37:00)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
...with a more simple case:
"""
import sys, cPickle
sys.setrecursionlimit(10405)
class rec(object):
child = None
def __init__(self, counter):
if counter > 0:
self.child = rec(counter-1)
mychain = rec(2600)
cPickle.dumps(mychain)
"""
Note that if we put the recursion limit in 10405 we get a segfault, but
if we put it 10404, we get a "RuntimeError: maximum recursion depth
exceeded".
Considering that 10400 is exactly 2600 * 4, maybe this is a useful hint.
Another behaviour I got: With a recursion limit big big enough, doing
rec(1670) works ok, and rec(1671) segfaults.
And a very nasty one:
I put rec(1671) to see in which recursion limit we have the conversion
of RecursionLimit to SegFault. Testing, I tried with recursion limit in
6700, and sometimes it worked ok, and sometimes it segfaulted. Yes,
*sometimes*, :(
----------
nosy: +facundobatista
_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3338>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com