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: Fix incorrect use of *Realloc() and *Resize()
Type: resource usage Stage:
Components: Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: kristjan.jonsson, python-dev, vstinner
Priority: normal Keywords: patch

Created on 2012-05-25 09:58 by kristjan.jonsson, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
realloc.diff kristjan.jonsson, 2012-05-25 09:58 review
Messages (3)
msg161561 - (view) Author: Kristján Valur Jónsson (kristjan.jonsson) * (Python committer) Date: 2012-05-25 09:58
A number of places were using PyMem_Realloc() apis and PyObject_GC_Resize() with incorrect error handling.  In case of errors, they would leak the original object.  This patch fixes those cases.
msg161968 - (view) Author: Kristján Valur Jónsson (kristjan.jonsson) * (Python committer) Date: 2012-05-30 20:44
Since this is a trivial patch I'm going to go ahead and apply it.  I was just waiting for the ability to run the full test suite in 64 bits, but that is currently broken due to some other issues.
msg161988 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-05-31 09:55
New changeset 588ea940e5e3 by Kristjan Valur Jonsson in branch 'default':
Issue #14909: A number of places were using PyMem_Realloc() apis and
http://hg.python.org/cpython/rev/588ea940e5e3
History
Date User Action Args
2022-04-11 14:57:30adminsetgithub: 59114
2012-05-31 10:04:27kristjan.jonssonsetstatus: open -> closed
resolution: fixed
2012-05-31 09:55:00python-devsetnosy: + python-dev
messages: + msg161988
2012-05-30 20:44:39kristjan.jonssonsetmessages: + msg161968
2012-05-30 20:19:59vstinnersetnosy: + vstinner
2012-05-25 09:58:18kristjan.jonssoncreate