[New-bugs-announce] [issue23564] Patch fixing sanity check for ordered fd sequence in _posixsubprocess.c

Hisham Muhammad report at bugs.python.org
Mon Mar 2 17:50:12 CET 2015

New submission from Hisham Muhammad:

In Modules/_posixsubprocess.c, (the helper module for Lib/subprocess.py) there's a function called _sanity_check_python_fd_sequence which checks, as its comment says, if the fds in the sequence are all positive and sorted.

The check to verify if it is sorted is incorrect (missing the update to the prev_fd variable), and also it is missing a test to see if fd's are repeated (which they shouldn't be, so the test should use <= rather than <). 

The attached patch, written against Python 3.4.3 source code, fixes it.

components: Extension Modules
files: python-3.4.3-_posixsubprocess.c.fix.patch
keywords: patch
messages: 237061
nosy: Hisham Muhammad
priority: normal
severity: normal
status: open
title: Patch fixing sanity check for ordered fd sequence in _posixsubprocess.c
versions: Python 3.4
Added file: http://bugs.python.org/file38302/python-3.4.3-_posixsubprocess.c.fix.patch

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list