[quake3] Mac OS X Universal Binary (2nd try)

Tony J. White tjw at webteam.net
Thu Jun 8 11:00:56 EDT 2006


On Thu, Jun 08, 2006 at 08:48:20AM +0200, Ludwig Nussel wrote:
> On Thursday 08 June 2006 06:57, Tony J. White wrote:
> > On Wed, Jun 07, 2006 at 09:25:46PM -0700, Daniel Lord wrote:
> > > Loading vm file vm/ui.qvm...
> > > Received signal 10, exiting...
> > 
> > My last build caught signal 4 when loading the x86 vm, so I assumed this was
> > the same problem that was giving WinXP SP2 users grief with the NoExec (NX)
> > thing. I was hoping I could just piggy-back on the linux version of the NX vm
> > loading. Guess not. 
> 
> Does quake3 work with dlls or the interpreter? What do signals 4 and
> 10 mean on MacOS?

4 is "illegal instruction" which I assumed was from trying to execute the
vm code that had been been placed into memory which was reserved with
malloc() (see vm_x86.c).  

10 is "bad memory access".  In the latest build it comes from trying to use
the same mmap() mprotect() calls that the linux version uses to get around
NX.  Specifically it crashes when we Com_Memcpy() the vm code into the memory
reserved with:

  mmap(NULL, compiledOfs, PROT_WRITE, MAP_SHARED|MAP_ANON, -1, 0);

I'm not sure why this is yet, or even if I'm on the write track with the
reason for catching signal 4.

-Tony




More information about the quake3 mailing list