lightning
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lightning] Re: failure with GNU lightning on Mac OS X 10.6.2


From: Paolo Bonzini
Subject: Re: [Lightning] Re: failure with GNU lightning on Mac OS X 10.6.2
Date: Tue, 23 Feb 2010 13:35:13 +0100

> Dang, I feel like you guys almost have it solved.

Possibly.

First solution:

       codeBuffer = mmap (NULL, 4096, PROT_EXEC | PROT_READ | PROT_WRITE,
                   MAP_PRIVATE | MAP_ANON, -1, 0);

(Ludovic proposed "-1" as the last argument).

Second solution: revert to statically allocated codeBuffer and add

      mprotect (((long) codeBuffer) & ~4095, 8192,
                PROT_READ | PROT_WRITE | PROT_EXEC);

before invoking it.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]