Request for Python 1.6 or higher: catch infinite recursion before Windows does!
Warren Postma
embed at geocities.com
Mon Mar 27 16:20:15 EST 2000
here's a nice bit 'o code:
def func(X):
return func(X)*5
Result on Windows:
Presumably this recurses a few hundred (thousand?) levels deep, then blows
up.
The exception uknown software exception (0xc0000000fd) occurred int he
application at location 0x77fc9811.
If you go into the debugger, you can learn that it's a stack overflow error
in ntdll.dll
Is it possible for Python to put some kind of hard limit on recursion on
Windows, to catch Infinite recursions at some sane point that is always
before Windows does!?
I betcha Stackless doesn't have this problem.... Hmm. Where are Stackless
binaries for Windows!? I'm gonna go find them, finally...
Warren
More information about the Python-list
mailing list