[Python-bugs-list] [ python-Bugs-756576 ] Recursion limit too high for MacOSX
SourceForge.net
noreply@sourceforge.net
Sat, 21 Jun 2003 06:50:34 -0700
Bugs item #756576, was opened at 2003-06-18 15:01
Message generated for change (Comment added) made by loewis
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=756576&group_id=5470
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jack Jansen (jackjansen)
Assigned to: Nobody/Anonymous (nobody)
Summary: Recursion limit too high for MacOSX
Initial Comment:
Python's recursion limit is too high for Mac OS X, where the
default stack size is 512K. The attached script will never
trigger a maximum recursion depth exception, it will have
crashed Python with a segmentation violation before that.
A possible solution is a call to sys.setrecursionlimit() in
site.py, another is to change the number "1000" in ceval.c
to a configure-time constant.
Other platforms may also suffer this problem, it may be a
good idea to add a test_stackoverflow.
I'm willing to do the work involved, but I'd like some
feedback first.
----------------------------------------------------------------------
>Comment By: Martin v. Löwis (loewis)
Date: 2003-06-21 15:50
Message:
Logged In: YES
user_id=21627
If more work is put into recursion limits, I think platform
mechanisms should be used where available. For example,
there might be ways to find out, at run-time, what the stack
consumption is, and what the stack availalability is, and
compute a recursion limit from that.
----------------------------------------------------------------------
Comment By: Jeremy Hylton (jhylton)
Date: 2003-06-18 17:40
Message:
Logged In: YES
user_id=31392
I'd like to see a per-platform recusion limit, because the
limit could be much higher on Linux and Windows than 1000.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=756576&group_id=5470