Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue18344

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:_bufferedreader_read_all() may leak reference to data
Type:resource usageStage:resolved
Components:Extension ModulesVersions:Python 3.3, Python 3.4
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: christian.heimes, pitrou, python-dev, sbt, serhiy.storchaka
Priority:normalKeywords:patch

Created on2013-07-01 23:11 bychristian.heimes, last changed2022-04-11 14:57 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
buf-readall.patchsbt,2013-07-02 07:29review
Messages (3)
msg192160 -(view)Author: Christian Heimes (christian.heimes)*(Python committer)Date: 2013-07-01 23:11
Modules/_io/bufferedio.c:_bufferedreader_read_all() doesn't call Py_XDECREF(data) multiple times and may leak a reference in an error case. For example the ref leak occurs when current_size > 0 and PyObject_CallMethodObjArgs(self->raw, _PyIO_str_readall, NULL) fails orbuffered_flush_and_rewind_unlocked(self) fails.There are a few more places where data isn't decrefed on return, too.CID 715364 (#2 of 2): Resource leak (RESOURCE_LEAK)leaked_storage: Variable "data" going out of scope leaks the storage it points to.
msg192178 -(view)Author: Richard Oudkerk (sbt)*(Python committer)Date: 2013-07-02 07:29
Patch attached.
msg193110 -(view)Author: Roundup Robot (python-dev)(Python triager)Date: 2013-07-15 15:11
New changeset9ce863993a38 by Richard Oudkerk in branch '3.3':Issue#18344: Fix potential ref-leaks in _bufferedreader_read_all().http://hg.python.org/cpython/rev/9ce863993a38New changeset9b041f44cb63 by Richard Oudkerk in branch 'default':Issue#18344: Fix potential ref-leaks in _bufferedreader_read_all().http://hg.python.org/cpython/rev/9b041f44cb63
History
DateUserActionArgs
2022-04-11 14:57:47adminsetgithub: 62544
2013-07-15 17:51:09sbtsetresolution: fixed
stage: needs patch -> resolved
2013-07-15 17:16:01sbtsetstatus: open -> closed
2013-07-15 15:11:29python-devsetnosy: +python-dev
messages: +msg193110
2013-07-02 07:29:01sbtsetfiles: +buf-readall.patch
keywords: +patch
messages: +msg192178
2013-07-02 07:19:38serhiy.storchakasetnosy: +serhiy.storchaka
2013-07-01 23:12:36vstinnersetnosy: +pitrou,sbt
2013-07-01 23:11:04christian.heimescreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp