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: ref-counting leak in buffer usage in Python/marshal.c
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 3.2, Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: pitrou, python-dev, scoder, skrah
Priority: normal Keywords: patch

Created on 2012-03-02 09:42 by scoder, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
marshalbufs.patch pitrou, 2012-03-02 16:22
Messages (4)
msg154755 - (view) Author: Stefan Behnel (scoder) * (Python committer) Date: 2012-03-02 09:42
Line 428 in Python/marshal.c calls pb->bf_releasebuffer() without dec-refing the view.obj field afterwards. I don't think this is really so truly performance critical that it can't accept the couple of nanoseconds that it takes to go through PyBuffer_Release() instead.
msg154775 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-03-02 16:22
Here is a patch.
msg154783 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-03-02 17:21
New changeset 185a6ae76479 by Antoine Pitrou in branch '3.2':
Issue #14172: Fix reference leak when marshalling a buffer-like object (other than a bytes object).
http://hg.python.org/cpython/rev/185a6ae76479

New changeset b1303cf15e01 by Antoine Pitrou in branch 'default':
Issue #14172: Fix reference leak when marshalling a buffer-like object (other than a bytes object).
http://hg.python.org/cpython/rev/b1303cf15e01
msg154784 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-03-02 17:23
Fixed. Apparently 2.7 isn't affected.
History
Date User Action Args
2022-04-11 14:57:27adminsetgithub: 58380
2012-03-02 17:23:45pitrousetstatus: open -> closed
resolution: fixed
messages: + msg154784

stage: patch review -> resolved
2012-03-02 17:21:13python-devsetnosy: + python-dev
messages: + msg154783
2012-03-02 16:22:51pitrousetstage: patch review
versions: - Python 3.1
2012-03-02 16:22:44pitrousetfiles: + marshalbufs.patch

nosy: + skrah, pitrou
messages: + msg154775

keywords: + patch
2012-03-02 09:42:58scodercreate