[quake3] Re: Quake3 client + server on Solaris/Sparc

vincent at cojot.name vincent at cojot.name
Fri Nov 11 02:45:53 EST 2005


On Thu, 10 Nov 2005, Laurent Desnogues wrote:

Hi Laurent,

>> It died inside the botlib initialization. Purify shows 'MAW' (Misaligned 
>> Memory Write) just before the crash. I got the following trace but I cannot 
>> make anything of it:
>>
>>       MAW: Misaligned memory write
>>       This is occurring while in:
>>             PC_ClearTokenWhiteSpace [l_precomp.c:1103]
>>                void PC_ClearTokenWhiteSpace(token_t *token)
>>                {
>>                        token->whitespace_p = NULL;
>>             =>         token->endwhitespace_p = NULL;
>>                        token->linescrossed = 0;
>>                } //end of the function PC_ClearTokenWhiteSpace
>
> I think you can launch a debugger when Purify finds
> such a problem (never tried, but saw it documented).
>
> Anyway the problem here is that the offset into the
> aligned block is a multiple of 4 and not of 8 and
> you are compiling in 64 bit mode (could you try in
> 32 bit mode?).

That's the problem.. I'm -not- trying to compile with -m64, I compiling 
with -m32, of course..

> My *very wild* guess is that given the size of the
> original allocation (16 MB) Q3 is doing its own
> memory management into the area and aligns on
> multiple of 4 bytes instead of 8.  By looking very
> quickly at the svn repository another wild guess is
> that the GetMemory in l_memory.c might be wrong.
> There are two instances of it depending on whether
> MEMORYMANEGER is defined or not.  Anyway I don't see
> any aligment enforcement there, whereas the
> alignment is enforced in qcommon/common.c/Z_TagMalloc.

Ok, thanks for the ideas.. You've read more q3 source than I did.. :)

Cheers,

-- 
,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,
Vincent S. Cojot, Computer Engineering. STEP project. _.,-*~'`^`'~*-,._.,-*~
Ecole Polytechnique de Montreal, Comite Micro-Informatique. _.,-*~'`^`'~*-,.
Linux Xview/OpenLook resources page _.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'
http://step.polymtl.ca/~coyote  _.,-*~'`^`'~*-,._ coyote at NOSPAM4cojot.name

They cannot scare me with their empty spaces
Between stars - on stars where no human race is
I have it in me so much nearer home
To scare myself with my own desert places.       - Robert Frost





More information about the quake3 mailing list