libffi & fork

Andrew Haley aph@redhat.com
Wed Apr 25 09:11:00 GMT 2012


On 04/24/2012 08:40 PM, Gaash Hazan wrote:

> I am new to libffi, so forgive me for my ignorance.
> 
> I have a python crash involving ctypes and functions callbacks (read
> closures) and fork. The crash happens when process is forked, some
> callbacks are modified and a function callback is made. I suspect that
> the problem could be related to libffi closures and fork.

There is, as far as I can see, only one way to remedy this: allow
python to map anonymous memory with both write and execute permission.
Then it should work fine.

Andrew.



More information about the Libffi-discuss mailing list