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: Refcounting error in str.translate fastpath
Type: behavior Stage: resolved
Components: Versions: Python 3.4, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: josh.r, python-dev, vstinner
Priority: normal Keywords: patch

Created on 2014-04-07 23:10 by josh.r, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
fix_translate_none.patch josh.r, 2014-04-07 23:10 review
Messages (5)
msg215718 - (view) Author: Josh Rosenberg (josh.r) * (Python triager) Date: 2014-04-07 23:10
Py_None is not being properly decref-ed in the str.translate fast path. I've attached a simple patch that fixes this (also corrects some comments and types in the same function).

No idea is Py_None ref leaks are considered a serious problem, but I figure it's better to be safe than sorry.
msg215719 - (view) Author: Josh Rosenberg (josh.r) * (Python triager) Date: 2014-04-07 23:11
For reference, bug introduced by fix for #21118.
msg215720 - (view) Author: Josh Rosenberg (josh.r) * (Python triager) Date: 2014-04-07 23:13
Also, just to be clear, I submitted the contributor form earlier this evening (using the online submission tool), so as soon as that propagates, it should be possible to accept my code.
msg215722 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-04-08 00:16
New changeset fa6debebfe8b by Benjamin Peterson in branch 'default':
fix reference leaks in the translate fast path (closes #21175)
http://hg.python.org/cpython/rev/fa6debebfe8b
msg215743 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-04-08 07:15
> New changeset fa6debebfe8b by Benjamin Peterson in branch 'default':
> fix reference leaks in the translate fast path (closes #21175)
> http://hg.python.org/cpython/rev/fa6debebfe8b

Thanks Benjamin for the quick fix!
History
Date User Action Args
2022-04-11 14:58:01adminsetgithub: 65374
2014-04-08 07:15:34vstinnersetmessages: + msg215743
2014-04-08 00:16:20python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg215722

resolution: fixed
stage: resolved
2014-04-07 23:13:25josh.rsetmessages: + msg215720
2014-04-07 23:11:43josh.rsetmessages: + msg215719
2014-04-07 23:10:56josh.rcreate