Skip to content

Throwing an Exception results in stack overflow #84202

Closed

Description

@PythonCoderAS
BPO 40021
Nosy @ronaldoussoren, @ned-deily, @PythonCoderAS
Superseder
  • bpo-6028: Interpreter aborts when chaining an infinite number of exceptions
  • Files
  • error.log: Crash log
  • interpter.txt: Interpter output
  • python2.txt: Python2 output
  • program.py: Test program
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2020-03-20.02:37:12.618>
    created_at = <Date 2020-03-20.02:25:19.899>
    labels = ['OS-mac', 'interpreter-core', '3.7', 'type-crash']
    title = 'Throwing an Exception results in stack overflow'
    updated_at = <Date 2020-03-20.02:37:12.617>
    user = 'https://github.com/PythonCoderAS'

    bugs.python.org fields:

    activity = <Date 2020-03-20.02:37:12.617>
    actor = 'benjamin.peterson'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-03-20.02:37:12.618>
    closer = 'benjamin.peterson'
    components = ['Interpreter Core', 'macOS']
    creation = <Date 2020-03-20.02:25:19.899>
    creator = 'ThePokestarFan'
    dependencies = []
    files = ['48984', '48985', '48986', '48987']
    hgrepos = []
    issue_num = 40021
    keywords = []
    message_count = 2.0
    messages = ['364646', '364647']
    nosy_count = 3.0
    nosy_names = ['ronaldoussoren', 'ned.deily', 'ThePokestarFan']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '6028'
    type = 'crash'
    url = 'https://bugs.python.org/issue40021'
    versions = ['Python 3.7']

    Activity

    1. PythonCoderAS commented on Mar 20, 2020

      PythonCoderASmannequin
      MannequinAuthor

      If I set up a simple recursion exception function, that calls itself every time an error is raised, Python throws a SIGABRT and crashes due to a "Stack Overflow".

      def x():
          try:
              raise Exception()
          except Exception:
              x()

      Oddly enough, my system installation of Python 2.7 threw a RuntimeError instead of aborting, which is what I expected.

    2. added
      interpreter-core(Objects, Python, Grammar, and Parser dirs)
      type-crashA hard crash of the interpreter, possibly with a core dump
      on Mar 20, 2020
    3. PythonCoderAS commented on Mar 20, 2020

      PythonCoderASmannequin
      MannequinAuthor

      I tested the program against my 3.8 installation and got the same error.

    4. transferred this issue fromon Apr 10, 2022
    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

      3.7 (EOL)end of lifeOS-macinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-crashA hard crash of the interpreter, possibly with a core dump

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions