« Return to Thread: libffi & fork

Re: libffi & fork

by Andrew Haley :: Rate this Message:

| View in Thread

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.

 « Return to Thread: libffi & fork