[quake3] Re: Quake3 client + server on Solaris/Sparc
Laurent Desnogues
laurent.desnogues at wanadoo.fr
Thu Nov 10 17:15:28 EST 2005
vincent at cojot.name wrote:
> Yes, I ran it and with the optimized version and purify, I got a lot
> more UMR's (Uninitialized Memory Read) than with the debug version.
I often have this problem with Purify. It's mostly
due to structures being copied as a whole even when
some of their bytes are not used. One can call it
noise, but there can be some bug lurking there :/
> 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?).
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.
Hope it may provide some hint...
Regards,
Laurent
More information about the quake3
mailing list