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.
Created on 2011年09月20日 14:57 by Suman.Saha, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| python_patch8 | Suman.Saha, 2011年09月20日 14:57 | Patch | review | |
| Messages (6) | |||
|---|---|---|---|
| msg144337 - (view) | Author: Suman Saha (Suman.Saha) | Date: 2011年09月20日 14:57 | |
Something that is allocated using PySequence_Fast is not freed on one error path. |
|||
| msg144339 - (view) | Author: Ezio Melotti (ezio.melotti) * (Python committer) | Date: 2011年09月20日 15:09 | |
Hi, thanks for the report(s) and the patch(es)! I think it would be better to have a test that shows the refleak for each of the patches that you submitted. Just out of curiosity, how did you find these? |
|||
| msg144398 - (view) | Author: Meador Inge (meador.inge) * (Python committer) | Date: 2011年09月22日 02:52 | |
In general I agree that a test case is needed, but in this particular case its looks to be non-trivial to come up with one. The only way the reference leak is triggered is when memory is exhausted during an attempt to new up a 'PyStructSequence' object. |
|||
| msg151656 - (view) | Author: Torsten Landschoff (torsten) * | Date: 2012年01月19日 21:52 | |
+1 for the patch. All the error paths above the change do Py_DECREF(arg); return NULL; arg is initialized with PySequence_Fast, which returns a new reference. Hard to create a test case for this... |
|||
| msg153387 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年02月15日 02:00 | |
New changeset 6454e5de7c34 by Antoine Pitrou in branch '3.2': Issue #13020: Fix a reference leak when allocating a structsequence object fails. http://hg.python.org/cpython/rev/6454e5de7c34 New changeset 5e0085d67f65 by Antoine Pitrou in branch 'default': Issue #13020: Fix a reference leak when allocating a structsequence object fails. http://hg.python.org/cpython/rev/5e0085d67f65 New changeset 08a85fc85bf2 by Antoine Pitrou in branch '2.7': Issue #13020: Fix a reference leak when allocating a structsequence object fails. http://hg.python.org/cpython/rev/08a85fc85bf2 |
|||
| msg153388 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2012年02月15日 02:01 | |
I've now committed the patch. Thanks for contributing! |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:21 | admin | set | github: 57229 |
| 2012年02月15日 02:01:29 | pitrou | set | status: open -> closed versions: + Python 2.7, Python 3.2, Python 3.3 nosy: + pitrou messages: + msg153388 resolution: fixed stage: test needed -> resolved |
| 2012年02月15日 02:00:55 | python-dev | set | nosy:
+ python-dev messages: + msg153387 |
| 2012年01月19日 21:52:33 | torsten | set | nosy:
+ torsten messages: + msg151656 |
| 2011年09月22日 02:52:35 | meador.inge | set | nosy:
+ meador.inge messages: + msg144398 |
| 2011年09月21日 19:23:21 | skrah | set | title: Resource is not released before returning from the functiion -> structseq.c: refleak |
| 2011年09月20日 15:09:54 | ezio.melotti | set | nosy:
+ ezio.melotti messages: + msg144339 stage: test needed |
| 2011年09月20日 14:57:35 | Suman.Saha | create | |