
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2019-01-11 19:14 byLucas Cimon, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 11528 | merged | python-dev,2019-01-11 19:16 | |
| PR 11528 | merged | python-dev,2019-01-11 19:16 | |
| PR 11528 | merged | python-dev,2019-01-11 19:16 | |
| PR 11648 | merged | miss-islington,2019-01-22 16:16 | |
| PR 11648 | merged | miss-islington,2019-01-22 16:16 | |
| Messages (4) | |||
|---|---|---|---|
| msg333499 -(view) | Author: Lucas Cimon (Lucas Cimon)* | Date: 2019-01-11 19:14 | |
Hi.I think I have found a minor memory leak inModules/main.c:pymain_parse_cmdline_impl.When the loop in the pymain_read_conf function in this same filecalls pymain_init_cmdline_argv a 2nd time, the pymain->commandbuffer of wchar_t is overriden and the previously allocated memoryis never freed.I haven't written any code test to reproduce this,but it can be tested easily with gdb:```gdb -- bin/python3 -c passstartbModules/main.c:587b pymain_clear_pymaincc```You'll see that PyMem_RawMalloc is called twice without pymain->command ever being freed in pymain_clear_pymain.I have a patch coming as PR on GitHubI'd be glad to have your feedback on this issue and my proposal for a fix.Regards. | |||
| msg334217 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2019-01-22 16:15 | |
New changeset35ca1820e19f81f69073f294503cdcd708fe490f by Victor Stinner (Lucas Cimon) in branch 'master':bpo-35720: Fixing a memory leak in pymain_parse_cmdline_impl() (GH-11528)https://github.com/python/cpython/commit/35ca1820e19f81f69073f294503cdcd708fe490f | |||
| msg334220 -(view) | Author: miss-islington (miss-islington) | Date: 2019-01-22 16:42 | |
New changesetf71e7433ebccb2e3a2665b93bb84de38f9c581c8 by Miss Islington (bot) in branch '3.7':bpo-35720: Fixing a memory leak in pymain_parse_cmdline_impl() (GH-11528)https://github.com/python/cpython/commit/f71e7433ebccb2e3a2665b93bb84de38f9c581c8 | |||
| msg334221 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2019-01-22 16:43 | |
Thanks Lucas Cimon! | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:10 | admin | set | github: 79901 |
| 2019-01-22 16:43:52 | vstinner | set | status: open -> closed messages: +msg334221 keywords:patch,patch,patch resolution: fixed stage: patch review -> resolved |
| 2019-01-22 16:42:16 | miss-islington | set | nosy: +miss-islington messages: +msg334220 |
| 2019-01-22 16:16:09 | miss-islington | set | pull_requests: +pull_request11434 |
| 2019-01-22 16:16:03 | miss-islington | set | pull_requests: +pull_request11433 |
| 2019-01-22 16:15:05 | vstinner | set | messages: +msg334217 |
| 2019-01-14 10:05:04 | SilentGhost | set | keywords:patch,patch,patch nosy: +vstinner type: resource usage versions: + Python 3.7, Python 3.8 |
| 2019-01-11 19:16:22 | python-dev | set | keywords: +patch stage: patch review pull_requests: +pull_request11118 |
| 2019-01-11 19:16:20 | python-dev | set | keywords: +patch stage: (no value) pull_requests: +pull_request11117 |
| 2019-01-11 19:16:17 | python-dev | set | keywords: +patch stage: (no value) pull_requests: +pull_request11116 |
| 2019-01-11 19:14:02 | Lucas Cimon | create | |