[issue15893] Py_FrozenMain() resource leak and missing malloc checks

2014-03-23 Thread STINNER Victor

STINNER Victor added the comment:

 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.

--
resolution:  - fixed
status: languishing - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15893
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15893] Py_FrozenMain() resource leak and missing malloc checks

2014-03-22 Thread Mark Lawrence

Mark Lawrence added the comment:

This believe that this can be closed as Python 3.3 is no longer taking fixes.

--
nosy: +BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15893
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15893] Py_FrozenMain() resource leak and missing malloc checks

2013-10-21 Thread Christian Heimes

Christian Heimes added the comment:

Victor, is here anything left to do?

--
assignee:  - haypo
stage:  - commit review
status: open - languishing

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15893
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15893] Py_FrozenMain() resource leak and missing malloc checks

2013-07-26 Thread Roundup Robot

Roundup Robot added the comment:

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

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15893
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15893] Py_FrozenMain() resource leak and missing malloc checks

2013-07-26 Thread Roundup Robot

Roundup Robot added the comment:

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

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15893
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15893] Py_FrozenMain() resource leak and missing malloc checks

2013-07-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 12af9db5212a by Victor Stinner in branch '3.3':
Issue #15893: Remove dead code
http://hg.python.org/cpython/rev/12af9db5212a

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15893
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15893] Py_FrozenMain() resource leak and missing malloc checks

2013-07-26 Thread STINNER Victor

STINNER Victor added the comment:

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).

--
nosy: +haypo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15893
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15893] Py_FrozenMain() resource leak and missing malloc checks

2012-09-15 Thread Thomas Lee

Thomas Lee added the comment:

Patch against hg tip attached.

--
keywords: +patch
nosy: +thomaslee
Added file: http://bugs.python.org/file27202/issue-15893-01.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15893
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15893] Py_FrozenMain() resource leak and missing malloc checks

2012-09-09 Thread Christian Heimes

New submission from Christian Heimes:

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.

--
components: Interpreter Core
messages: 170139
nosy: christian.heimes
priority: normal
severity: normal
status: open
title: Py_FrozenMain() resource leak and missing malloc checks
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15893
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15893] Py_FrozenMain() resource leak and missing malloc checks

2012-09-09 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15893
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com