]> granicus.if.org Git - python/commit
bpo-24596: Decref module in PyRun_SimpleFileExFlags() on SystemExit (GH-7918) (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 3 Jul 2018 20:13:28 +0000 (13:13 -0700)
committerAntoine Pitrou <pitrou@free.fr>
Tue, 3 Jul 2018 20:13:28 +0000 (22:13 +0200)
commit20ae4c60258479a0732d12af292f422679444e2c
treef9c070334afe70acf494a4258f4dec21cfe212a4
parent6699386231d326c50439b9e1df752e1aed7ca6b4
bpo-24596: Decref module in PyRun_SimpleFileExFlags() on SystemExit (GH-7918) (GH-8070)

PyErr_Print() will not return when the exception is a SystemExit, so
decref the __main__ module object in that case.
(cherry picked from commit d8cba5d16f1333fd625726fc72e66afbd45b8d00)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Lib/test/test_gc.py
Misc/NEWS.d/next/Core and Builtins/2018-06-25-16-54-05.bpo-24596.Rkwova.rst [new file with mode: 0644]
Python/pythonrun.c