[issue15895] PyRun_SimpleFileExFlags() can leak a FILE pointer

2012-09-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset fe4e6e0d6b0f by Christian Heimes in branch 'default': Issue #15895: Fix FILE pointer leak in PyRun_SimpleFileExFlags() when filename points to a pyc/pyo file and closeit is false. http://hg.python.org/cpython/rev/fe4e6e0d6b0f New changeset

[issue15895] PyRun_SimpleFileExFlags() can leak a FILE pointer

2012-09-22 Thread Georg Brandl
Georg Brandl added the comment: Now transplanted to release clone. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15895 ___

[issue15895] PyRun_SimpleFileExFlags() can leak a FILE pointer

2012-09-21 Thread STINNER Victor
STINNER Victor added the comment: This issue is not a regression, I think that the fix can wait for Python 3.3.1. -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15895 ___

[issue15895] PyRun_SimpleFileExFlags() can leak a FILE pointer

2012-09-21 Thread STINNER Victor
STINNER Victor added the comment: This issue is not a regression My bad, Crys explained me on IRC that the leak does not exist in Python 3.2, it was introduced by the importlib. So it is a regression. -- ___ Python tracker rep...@bugs.python.org

[issue15895] PyRun_SimpleFileExFlags() can leak a FILE pointer

2012-09-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4754c4a710e6 by Christian Heimes in branch 'default': Issue #15895: Fix FILE pointer leak in PyRun_SimpleFileExFlags() when filename points to a pyc/pyo file and closeit is false. http://hg.python.org/cpython/rev/4754c4a710e6 -- nosy:

[issue15895] PyRun_SimpleFileExFlags() can leak a FILE pointer

2012-09-11 Thread Christian Heimes
Christian Heimes added the comment: The bug was a 3.3 regression, possibly introduced with the merge of importlib. I forgot to tick the 3,3regression keyword. I've applied the fix. I'm leaving this ticket open and assigned to Georg for 3.3.0. -- keywords: +3.3regression resolution:

[issue15895] PyRun_SimpleFileExFlags() can leak a FILE pointer

2012-09-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset c3539eb02470 by Christian Heimes in branch 'default': Issue #15895: my analysis was slightly off. The FILE pointer is only leaked when set_main_loader() fails for a pyc file with closeit=0. In the success case run_pyc_file() does its own cleanup

[issue15895] PyRun_SimpleFileExFlags() can leak a FILE pointer

2012-09-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6fea947edead by Christian Heimes in branch 'default': Updates NEWS for issue #15895 http://hg.python.org/cpython/rev/6fea947edead -- ___ Python tracker rep...@bugs.python.org

[issue15895] PyRun_SimpleFileExFlags() can leak a FILE pointer

2012-09-10 Thread Christian Heimes
Christian Heimes added the comment: No, that's not possible. 'fp' is part of the argument to PyRun_SimpleFileExFlags() and never NULL. We need some way to distinguish a externally provided fp from a self-opened fp and fclose(fp) in the latter case. --

[issue15895] PyRun_SimpleFileExFlags() can leak a FILE pointer

2012-09-10 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Look good to me, then. Are you committing the patch yourself?. You can patch 2.7, 3.2 and default, and bug Georg for 3.3.0 inclusion (patches to default will be in 3.3.1), unless Georg is notified and chooses to cherry pick it. --

[issue15895] PyRun_SimpleFileExFlags() can leak a FILE pointer

2012-09-09 Thread Christian Heimes
New submission from Christian Heimes: In Python/pythonrun.c PyRun_SimpleFileExFlags() may leak a FILE pointer if closeit is False and maybe_pyc_file returns true. This happens when the filename ends with .pyc or .pyc. In this case the file is opened a second time with fopen() a few lines

[issue15895] PyRun_SimpleFileExFlags() can leak a FILE pointer

2012-09-09 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: LGTM. Instead of using a flag variable, could you use something like if (fp!=NULL) fclose(fp);? -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15895