[Python-Dev] Is Lib/test/crashers/recursive_call.py really a crasher?
brett at python.org
Tue Jun 27 19:06:32 CEST 2006
On 6/27/06, Thomas Wouters <thomas at python.org> wrote:
> On 6/27/06, Brett Cannon <brett at python.org> wrote:
> > If you look at that crasher, you will notice that recursion depth is set
> > to 1 << 30 before any code is run. If you remove that setting high setting
> > and go with the default then the test doesn't crash and raises the
> > appropriate RuntimeError.
> > Setting the recursion depth to such a high number will crash the
> > interpreter even when the proper recursion checks are in place. This
> > doesn't seem like a legit crasher to me if it requires an insane recursion
> > depth that would crash almost any C program that had recursion in it.
> > Anyone have any objections if I call foul on the test and remove it
> > without any changes to Python?
> Well, it's a valid crasher. It crashes Python to recurse too much. The
> recursion limit was added to CPython to prevent the crash from happening too
> easily, but that limit is just an implementation detail (and furthermore,
> the actual limit is just guessed.) It's not like a real solution is
> impossible, it's just very complex. Much like, say, restricted execution :-)
OK, let me rephrase: I don't feel like fixing this if the proper thing
happens when the default recursion depth is in place. There are a ton of
other recursion issues if you set the recursion depth to 1,073,741,824. One
could try to make the interpreter non-recursive or stackless, but I leave
that to people who are smarter than me. =)
And so, with that view, I don't see the test as something that needs special
attention that is brought by being in crashers since I suspect that one will
sit there forever. =)
Hi! I'm a .signature virus! copy me into your .signature file to help me
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev