This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: closure api problems


Andrew Haley wrote:
Aaron Patterson wrote:
On Mon, Nov 16, 2009 at 07:45:36PM +0000, Andrew Haley wrote:
Aaron Patterson wrote:
I'm running 64bit OS X (Snow Leopard).  Any help would be greatly
appreciated!
I think Snow Leopard forbids exec permission on data memory.
You need to make sure that FFI_MMAP_EXEC_WRIT is set in closures.c.
That seems to fix it.  Is it safe to define that constant for all
platforms?  Or just Snow Leopard?

We could do it for all Sarwin.

;)


I think darwin10+ is enough.

Are you planning a permanent fix for master?

Not me, because I can't test it. Patches welcome.

Something like this could be ok, untested. You need an autoconfig run.


[deuterium:~/Desktop/libffi-3.0.9rc3] andreast% diff -u configure.ac.orig configure.ac
--- configure.ac.orig 2009-11-16 21:50:16.000000000 +0100
+++ configure.ac 2009-11-16 21:51:22.000000000 +0100
@@ -275,7 +275,7 @@
fi


 case "$target" in
-    i?86-apple-darwin10* | *-*-freebsd* | *-*-openbsd*)
+    *-apple-darwin10* | *-*-freebsd* | *-*-openbsd*)
 	AC_DEFINE(FFI_MMAP_EXEC_WRIT, 1,
 		  [Cannot use malloc on this target, so, we revert to
 		   alternative means])



Andreas


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]