Issue 36126: Reference count leakage in structseq_repr
Created on 2019-02-26 17:09 by zasdfgbnm, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| structseq.tar.xz | zasdfgbnm, 2019-02-26 17:09 | |||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 12035 | merged | zasdfgbnm, 2019-02-26 17:09 | |
| Messages (2) | |||
|---|---|---|---|
| msg336699 - (view) | Author: zasdfgbnm (zasdfgbnm) * | Date: 2019-02-26 17:09 | |
In Python 2.7 structseq is not a tuple, and in `structseq_repr` a tuple is created to help extracting items. However when the check at https://github.com/python/cpython/blob/2.7/Objects/structseq.c#L268 fails, the reference count of this tuple is not decreased, causing memory leakage. To reproduce, download the attached file, install and run the `quicktest.py` and watch the memory usage. This bug only exists on python 2.7, because on python >3.2, no helper tuple is created. |
|||
| msg336834 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2019-02-28 13:19 | |
New changeset 69b4a17f342146d6b7a73975a37678db9916aa75 by Serhiy Storchaka (Gao, Xiang) in branch '2.7': bpo-36126: Fix ref count leakage in structseq_repr. (GH-12035) https://github.com/python/cpython/commit/69b4a17f342146d6b7a73975a37678db9916aa75 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:11 | admin | set | github: 80307 |
| 2019-02-28 13:20:19 | serhiy.storchaka | set | status: open -> closed type: behavior -> resource usage resolution: fixed stage: resolved |
| 2019-02-28 13:19:00 | serhiy.storchaka | set | nosy:
+ serhiy.storchaka messages: + msg336834 |
| 2019-02-26 17:09:57 | zasdfgbnm | create | |
