[issue3399] Memory corruption in multiprocessing module, OS X 10.5.4

Amaury Forgeot d'Arc report at bugs.python.org
Fri Aug 1 16:21:08 CEST 2008


Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:

> Assertion failed: (bp != NULL), function PyObject_Malloc, file 
> Objects/obmalloc.c, line 755.

This one gives one probable cause of the problem:

- in Modules/_multiprocessing/connection.h, connection_send_obj()
releases the GIL around a call to conn_send_string().
- in Modules/_multiprocessing/socket_connection.c, conn_send_string()
uses PyMem_Malloc()

This is wrong (the GIL must be held when using the PyMem_* and
PyObject_* functions), and is probably the cause of the failed assertion.

----------
nosy: +amaury.forgeotdarc

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3399>
_______________________________________


More information about the Python-bugs-list mailing list