STINNER Victor <vstin...@redhat.com> added the comment:

> Is test_socket of Python 2.7 affected by the issue? If not, I suggest to 
> remove 2.7 from this issue and close it.

Some "FD transfer" tests of test_multiprocessing still fail on AMD64 FreeBSD 
CURRENT Shared 2.7:

https://buildbot.python.org/all/#/builders/169/builds/36

Re-running test 'test_multiprocessing' in verbose mode
FAIL: test_fd_transfer (test.test_multiprocessing.WithProcessesTestConnection)
FAIL: test_large_fd_transfer 
(test.test_multiprocessing.WithProcessesTestConnection)

Modules/_multiprocessing/multiprocessing.c uses CMSG_SPACE() *and* CMSG_LEN(). 
Are they used properly? I don't understand the code, but I propose:

diff --git a/Modules/_multiprocessing/multiprocessing.c 
b/Modules/_multiprocessing/multiprocessing.c
index d192a074ba..eecace887e 100644
--- a/Modules/_multiprocessing/multiprocessing.c
+++ b/Modules/_multiprocessing/multiprocessing.c
@@ -167,7 +167,7 @@ multiprocessing_recvfd(PyObject *self, PyObject *args)
     cmsg = CMSG_FIRSTHDR(&msg);
     cmsg->cmsg_level = SOL_SOCKET;
     cmsg->cmsg_type = SCM_RIGHTS;
-    cmsg->cmsg_len = CMSG_LEN(sizeof(int));
+    cmsg->cmsg_len = CMSG_SPACE(sizeof(int));
     msg.msg_controllen = cmsg->cmsg_len;
 
     Py_BEGIN_ALLOW_THREADS

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34521>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to