Title: Throwing an Exception results in stack overflow
Type: crash Stage: resolved
Components: Interpreter Core, macOS Versions: Python 3.7
Status: closed Resolution: duplicate
Dependencies: Superseder: Interpreter aborts when chaining an infinite number of exceptions
View: 6028
Assigned To: Nosy List: ThePokestarFan, ned.deily, ronaldoussoren
Priority: normal Keywords:

Created on 2020-03-20 02:25 by ThePokestarFan, last changed 2020-03-20 02:37 by benjamin.peterson. This issue is now closed.

File name Uploaded Description Edit
error.log ThePokestarFan, 2020-03-20 02:25 Crash log
interpter.txt ThePokestarFan, 2020-03-20 02:26 Interpter output
python2.txt ThePokestarFan, 2020-03-20 02:29 Python2 output ThePokestarFan, 2020-03-20 02:30 Test program
Messages (2)
msg364646 - (view) Author: (ThePokestarFan) * Date: 2020-03-20 02:25
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():
        raise Exception()
    except Exception:

Oddly enough, my system installation of Python 2.7 threw a RuntimeError instead of aborting, which is what I expected.
msg364647 - (view) Author: (ThePokestarFan) * Date: 2020-03-20 02:33
I tested the program against my 3.8 installation and got the same error.
Date User Action Args
2020-03-20 02:37:12benjamin.petersonsetstatus: open -> closed
superseder: Interpreter aborts when chaining an infinite number of exceptions
stage: resolved
resolution: duplicate
versions: - Python 3.8
2020-03-20 02:33:20ThePokestarFansetmessages: + msg364647
versions: + Python 3.8
2020-03-20 02:30:56ThePokestarFansetfiles: +
2020-03-20 02:29:52ThePokestarFansetfiles: + python2.txt
2020-03-20 02:26:39ThePokestarFansetfiles: + interpter.txt
2020-03-20 02:25:19ThePokestarFancreate