W3C home > Mailing lists > Public > www-amaya-dev@w3.org > May 2000

Re: memory deallocation bug

From: Irene VATTON <Irene.Vatton@inrialpes.fr>
Date: Wed, 03 May 2000 08:25:19 +0200
Message-Id: <200005030625.IAA01173@tahiti.inrialpes.fr>
To: bglbv@my-deja.com
cc: www-amaya-dev@w3.org
> Following up on my earlier report of memory problems: it turned out to be a
> code generation bug in gcc. The gcc maintainers will have the report as soon
> as I find a way of getting past the message size limit on their mailing list.
> 
> Meanwhile, here is a patch that doesn't confuse gcc and saves two lines
> of source code (at no loss in functionality).
> 
> --- pristine/Amaya/thotlib/view/boxrelations.c	Mon Apr 17 12:05:22 2000
> +++ ./Amaya/thotlib/view/boxrelations.c	Mon May  1 20:48:38 2000
> @@ -2372,11 +2372,9 @@
>  		     while (j < MAX_RELAT_POS)
>  		       {
>  			  k = j + 1;
> -			  pPosRel->PosRTable[j - 1].ReBox = pPosRel->PosRTable[k - 1].ReBox;
> -			  pPosRel->PosRTable[j - 1].ReRefEdge = pPosRel->PosRTable[k - 1].ReRefEdge;
> -			  pPosRel->PosRTable[j - 1].ReOp = pPosRel->PosRTable[k - 1].ReOp;
> +			  pPosRel->PosRTable[j - 1] = pPosRel->PosRTable[k - 1];
>  			  if (pPosRel->PosRTable[k - 1].ReBox == NULL)
> -			     j = MAX_RELAT_POS;
> +			     break;
>  			  else
>  			    {
>  			       j++;
> 

Ok, I patched the code, but I'm surprised that gcc has trouble with this code.
Thanks
-- 
     Irene.
Received on Wednesday, 3 May 2000 02:25:38 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:31:04 UTC