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
Georg Brandl added the comment:
Now transplanted to release clone.
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15895
___
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
___
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
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:
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:
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
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
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.
--
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.
--
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
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
12 matches
Mail list logo