This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Throwing an Exception results in stack overflow
Type: crash Stage: resolved
Components: Interpreter Core, macOS Versions: Python 3.7
process
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 2022-04-11 14:59 by admin. This issue is now closed.

Files
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
program.py 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():
    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.
msg364647 - (view) Author: (ThePokestarFan) * Date: 2020-03-20 02:33
I tested the program against my 3.8 installation and got the same error.
History
Date User Action Args
2022-04-11 14:59:28adminsetgithub: 84202
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: + program.py
2020-03-20 02:29:52ThePokestarFansetfiles: + python2.txt
2020-03-20 02:26:39ThePokestarFansetfiles: + interpter.txt
2020-03-20 02:25:19ThePokestarFancreate