Roundup Robot added the comment:
New changeset 3337298f5c75 by Nadeem Vawda in branch '2.7':
Skip test for #19878 on Windows.
http://hg.python.org/cpython/rev/3337298f5c75
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19878
Roundup Robot added the comment:
New changeset 55a748f6e396 by Nadeem Vawda in branch '2.7':
Closes #19878: Fix segfault in bz2 module.
http://hg.python.org/cpython/rev/55a748f6e396
--
nosy: +python-dev
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
STINNER Victor added the comment:
I can reproduce the issue with Python 2.7. The problem is that
BZ2File.__init__() doesn't reset the object when __init__() is called twice.
For example, the following script fails with too many open files error,
before the previous file is not called:
---
Matthew Bergin added the comment:
I was fuzzing the interpreter otherwise it would init itself
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19878
___
Nadeem Vawda added the comment:
It appears that this *does* affect 2.7 (though not 3.2, 3.3 or 3.4,
fortunately):
~/src/cpython/2.7☿ gdb --ex run --args ./python -c 'import bz2; obj =
bz2.BZ2File(/dev/null); obj.__init__()'
«... snip banner ...»
Starting program:
Vajrasky Kok added the comment:
Here is the preliminary patch.
--
keywords: +patch
nosy: +vajrasky
title: bz2.BZ2File.__init__() cannot be called twice - bz2.BZ2File.__init__()
cannot be called twice with non-existent file
Added file: