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 2012年09月09日 22:09 by christian.heimes, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue-15893-01.patch | thomaslee, 2012年09月16日 04:42 | review | ||
| Messages (9) | |||
|---|---|---|---|
| msg170139 - (view) | Author: Christian Heimes (christian.heimes) * (Python committer) | Date: 2012年09月09日 22:09 | |
In Python/frozenmain.c the function Py_FrozenMain() doesn't handle argv_copy and argv_copy2 correctly. Both variables contain memory that is allocated with PyMem_Malloc(). argv_copy2 is never checked for NULL and both variables are not correctly cleaned up in error cases. CID 486834: Resource leak (RESOURCE_LEAK)At (11): Variable "argv_copy" going out of scope leaks the storage it points to. CID 486835: Resource leak (RESOURCE_LEAK)At (9): Variable "argv_copy2" going out of scope leaks the storage it points to. Suggested fix: Separate var declaration from PyMem_Malloc() calls and use a goto label to clean up the variables and its content at the end of the function. |
|||
| msg170547 - (view) | Author: Thomas Lee (thomaslee) (Python committer) | Date: 2012年09月16日 04:42 | |
Patch against hg tip attached. |
|||
| msg193763 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2013年07月26日 23:06 | |
New changeset ab8121466785 by Victor Stinner in branch '3.3': Issue #15893: frozenmain.c now handles PyMem_Malloc() failure http://hg.python.org/cpython/rev/ab8121466785 New changeset 386ab2c12301 by Victor Stinner in branch 'default': (Merge 3.3) Issue #15893: frozenmain.c now handles PyMem_Malloc() failure http://hg.python.org/cpython/rev/386ab2c12301 |
|||
| msg193767 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2013年07月27日 00:39 | |
New changeset 47c6aa17fd90 by Victor Stinner in branch 'default': Issue #15893: Improve error handling in main() and Py_FrozenMain() http://hg.python.org/cpython/rev/47c6aa17fd90 |
|||
| msg193768 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2013年07月27日 00:42 | |
New changeset 12af9db5212a by Victor Stinner in branch '3.3': Issue #15893: Remove dead code http://hg.python.org/cpython/rev/12af9db5212a |
|||
| msg193769 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2013年07月27日 00:43 | |
I didn't know Py_FrozenMain(). I upgraded it to use the same code than main(). Should I backport my fixes to Python 3.3 (except maybe 0001c4100823 which is risky). |
|||
| msg200725 - (view) | Author: Christian Heimes (christian.heimes) * (Python committer) | Date: 2013年10月21日 08:56 | |
Victor, is here anything left to do? |
|||
| msg214535 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2014年03月23日 01:51 | |
This believe that this can be closed as Python 3.3 is no longer taking fixes. |
|||
| msg214558 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2014年03月23日 10:00 | |
> Victor, is here anything left to do? The bug is correctly fixed in default. I don't really care of fixing such warning of static analyzer in older Python versions. It's more a theorical bug, it's a small memory leak and only occur if another error occurs. I just close the issue. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:35 | admin | set | github: 60097 |
| 2014年03月23日 10:00:53 | vstinner | set | status: languishing -> closed resolution: fixed messages: + msg214558 |
| 2014年03月23日 01:51:58 | BreamoreBoy | set | nosy:
+ BreamoreBoy messages: + msg214535 |
| 2013年10月21日 08:56:13 | christian.heimes | set | status: open -> languishing assignee: vstinner messages: + msg200725 stage: commit review |
| 2013年07月27日 00:43:49 | vstinner | set | nosy:
+ vstinner messages: + msg193769 |
| 2013年07月27日 00:42:08 | python-dev | set | messages: + msg193768 |
| 2013年07月27日 00:39:51 | python-dev | set | messages: + msg193767 |
| 2013年07月26日 23:06:01 | python-dev | set | nosy:
+ python-dev messages: + msg193763 |
| 2012年09月16日 04:42:04 | thomaslee | set | files:
+ issue-15893-01.patch nosy: + thomaslee messages: + msg170547 keywords: + patch |
| 2012年09月10日 02:25:56 | jcea | set | nosy:
+ jcea |
| 2012年09月09日 22:09:57 | christian.heimes | create | |