[issue11657] multiprocessing_{send,recv}fd fail with fds > 256
Ben Darnell
report at bugs.python.org
Thu Mar 24 01:57:26 CET 2011
New submission from Ben Darnell <ben.darnell at gmail.com>:
Line 125 of multiprocessing.c is "*CMSG_DATA(cmsg) = fd;". CMSG_DATA returns an unsigned char*, while fd is an int, so this code does not support file descriptors > 256 (additionally, I'm not sure if the buffer is guaranteed to be initialized with zeros). recvfd has an analogous problem at line 168. Both of these need to be changed to copy the entire integer, e.g. by casting the result of CMSG_DATA to an int*.
http://hg.python.org/cpython/file/5deb2094f033/Modules/_multiprocessing/multiprocessing.c
----------
messages: 131947
nosy: Ben.Darnell
priority: normal
severity: normal
status: open
title: multiprocessing_{send,recv}fd fail with fds > 256
type: behavior
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11657>
_______________________________________
More information about the Python-bugs-list
mailing list