Issue 14909: Fix incorrect use of *Realloc() and *Resize() (original) (raw)

This issue has been migrated to GitHub: https://github.com/python/cpython/issues/59114

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:30 admin set github: 59114
2012-05-31 10:04:27 kristjan.jonsson set status: open -> closedresolution: fixed
2012-05-31 09:55:00 python-dev set nosy: + python-devmessages: +
2012-05-30 20:44:39 kristjan.jonsson set messages: +
2012-05-30 20:19:59 vstinner set nosy: + vstinner
2012-05-25 09:58:18 kristjan.jonsson create