2010/9/26 Noah Lavine<address@hidden>:
Hello Lightning developers,
The attached patch fixes an issue with memory allocation on Mac OS X.
The trouble was that the test programs allocate memory for their
functions as static variables, but in Mac OS X statically allocated
memory is not marked as executable. This patch uses posix_memalign and
mprotect instead, which brings the number of failed tests on my
machine from 21 to 2.
I think most tests are somewhat bogus, and the way jit_flush_code()
works, and calls mprotect() is wrong, as it needs to adjust it to unaligned
memory, what means marking random, but on the same process, memory
as executable.