#72 no maximum recursion limit, segfault on deep recursion

closed-wont-fix
nobody
5
2007-01-20
2007-01-20
No

Psyco seems to prevent the "maximum recursion depth exceeded" exception from being raised. In some cases, when the recursion is deep enough, this results in a segmentation fault.

For example, when I run the following script:

def foo(n):
print n
foo(n + 1)

foo(0)

(without psyco) I get

0
1
2
(snip)
997
998
Traceback (most recent call last):
File "testcase.py", line 8, in ?
foo(0)
(snip)
File "testcase.py", line 7, in foo
foo(n - 1)
RuntimeError: maximum recursion depth exceeded

But if I add add

import psyco
psyco.full()

then I get

0
1
2
(snip)
232794
232795
Segmentation fault

Discussion

  • Armin Rigo

    Armin Rigo - 2007-01-20
    • status: open --> closed-wont-fix
     
  • Armin Rigo

    Armin Rigo - 2007-01-20

    Logged In: YES
    user_id=4771
    Originator: NO

    This is a known limitation. Won't fix, sorry.
    It's documented in "known bugs" in the Psyco guide.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks