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: leak in ctypes.resize()
Type: resource usage Stage: resolved
Components: Library (Lib) Versions: Python 3.2, Python 3.3, Python 3.4, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, belopolsky, meador.inge, pitrou, python-dev, skrah
Priority: normal Keywords: patch

Created on 2012-12-06 19:58 by pitrou, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
ctypesresizeleak.patch pitrou, 2012-12-06 19:58 review
Messages (4)
msg177052 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-12-06 19:58
ctypes.resize() (and/or the deallocator) can leak because of a logic error. Attached patch seems to fix it.
msg177112 - (view) Author: Meador Inge (meador.inge) * (Python committer) Date: 2012-12-07 19:17
This is the same as issue13091.  I proposed a similar fix there, but yours is more complete and seems reasonable to me.
msg177149 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-12-08 10:10
New changeset 1996171cfb96 by Antoine Pitrou in branch '3.2':
Issue #16628: Fix a memory leak in ctypes.resize().
http://hg.python.org/cpython/rev/1996171cfb96

New changeset cae5f3266b81 by Antoine Pitrou in branch '3.3':
Issue #16628: Fix a memory leak in ctypes.resize().
http://hg.python.org/cpython/rev/cae5f3266b81

New changeset def01022870a by Antoine Pitrou in branch 'default':
Issue #16628: Fix a memory leak in ctypes.resize().
http://hg.python.org/cpython/rev/def01022870a

New changeset df5a86a22310 by Antoine Pitrou in branch '2.7':
Issue #16628: Fix a memory leak in ctypes.resize().
http://hg.python.org/cpython/rev/df5a86a22310
msg177150 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-12-08 10:10
Should be fixed now.
History
Date User Action Args
2022-04-11 14:57:39adminsetgithub: 60832
2012-12-08 10:10:40pitrousetstatus: open -> closed
resolution: fixed
messages: + msg177150

stage: patch review -> resolved
2012-12-08 10:10:20python-devsetnosy: + python-dev
messages: + msg177149
2012-12-07 19:20:51pitrousetnosy: + skrah
2012-12-07 19:20:41pitroulinkissue13091 superseder
2012-12-07 19:17:53meador.ingesetmessages: + msg177112
2012-12-06 19:58:48pitroucreate