classification
Title: PyErr_SetImportError doesn't clean up on some errors
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: berker.peksag, blackfawn, gregory.p.smith, python-dev, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2015-04-14 23:12 by blackfawn, last changed 2016-05-01 06:07 by berker.peksag. This issue is now closed.

Files
File name Uploaded Description Edit
importerrorcleanup.patch blackfawn, 2015-04-14 23:12 patch review
Messages (5)
msg241052 - (view) Author: Ofer Schwarz (blackfawn) * Date: 2015-04-14 23:12
When creating kwargs to construct the ImportError, if PyDict_SetItemString fails the function returns without decref'ing the already-created locals.
msg264552 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-04-30 11:52
Thanks for the patch. I left review comments on Rietveld (click to the review link above).
msg264556 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-04-30 13:35
LGTM.
msg264581 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-05-01 06:07
New changeset 5871b48f4c2e by Berker Peksag in branch '3.5':
Issue #23960: Cleanup args and kwargs on error in PyErr_SetImportError
https://hg.python.org/cpython/rev/5871b48f4c2e

New changeset 94471357db08 by Berker Peksag in branch 'default':
Issue #23960: Cleanup args and kwargs on error in PyErr_SetImportError
https://hg.python.org/cpython/rev/94471357db08
msg264582 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-05-01 06:07
Thanks!
History
Date User Action Args
2016-05-01 06:07:28berker.peksagsetstatus: open -> closed
resolution: fixed
messages: + msg264582

stage: commit review -> resolved
2016-05-01 06:07:05python-devsetnosy: + python-dev
messages: + msg264581
2016-04-30 13:35:53serhiy.storchakasetnosy: + serhiy.storchaka

messages: + msg264556
stage: patch review -> commit review
2016-04-30 11:52:45berker.peksagsetversions: + Python 3.6
nosy: + berker.peksag

messages: + msg264552

stage: patch review
2015-04-14 23:12:48blackfawncreate