Skip to content

Infinite recursion cause segfault, not RecursionError #1374

Closed

Description

@xarus01

Code

def a():
    a()
a()

Expected

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 2, in a
  File "<stdin>", line 2, in a
  File "<stdin>", line 2, in a
  [Previous line repeated 996 more times]
RecursionError: maximum recursion depth exceeded

Result

[1]    36945 segmentation fault  RUSTPYTHONPATH=Lib cargo run

Activity

  1. added
    C-compatA discrepancy between RustPython and CPython
    on Sep 14, 2019
  2. youknowone commented on Jan 2, 2020

    @youknowone
    Member

    The given example now raises RecursionError (though the message is not compact as CPython)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-compatA discrepancy between RustPython and CPython

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions