[issue20866] segfailt with os.popen and SIGPIPE
Hanno Boeck
report at bugs.python.org
Fri Mar 7 19:22:29 CET 2014
New submission from Hanno Boeck:
I experience a segmentation fault with python 2.7 (both 2.7.5 and 2.7.6 tested on Ubuntu and Gentoo) when a large file is piped, the pipe is passed to os.popen and the process sends a SIGPIPE signal.
To create an easy to reproduce testcase grep can be used. See example attached.
To test first create a dummy file containing zeros, around 1 megabyte is enough:
for i in `seq 1 100000`; do echo "0123456789" >> dummy.txt; done
Then pipe it to the script attached like this:
cat dummy.txt | python2 minimal.py
Result is a Segmentation fault. The same code doesn't segfault with python 3.
----------
components: Interpreter Core
files: sigpipe_crash.py
messages: 212897
nosy: hanno
priority: normal
severity: normal
status: open
title: segfailt with os.popen and SIGPIPE
type: crash
versions: Python 2.7
Added file: http://bugs.python.org/file34301/sigpipe_crash.py
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20866>
_______________________________________
More information about the Python-bugs-list
mailing list