logo       

Re: Seeing memory corruption, GC moves my objects around: msg#00353

lisp.cmucl.devel

Subject: Re: Seeing memory corruption, GC moves my objects around

Mike McDonald wrote on Thu, Aug 28, 2003 at 06:10:34PM -0400:
>
> >Date: Thu, 28 Aug 2003 18:29:29 -0400
> >From: Martin Cracauer <cracauer@xxxxxxxx>
> >To: Gerd Moellmann <gerd.moellmann@xxxxxxxxxxx>
> >Subject: Re: Seeing memory corruption, GC moves my objects around
>
> >Well, yes. However, in this case we are in a loop which contains
> >purely readonly code and the data in that hashtable becomes corrupted
> >from one iteration to the next, without ever leaving the loop. Except
> >for the GC, if the GC runs we get the corruption.
>
> I assume you've done a GC right before entering the loop to make
> sure everything is OK going in? Just checking.

Har, har, har, sometimes I hate computers.

Ok, so I changed this:
----------------------
#+maybe (ext:gc-off)
(dotimes (i n)
(check-all-table-entries) ; fails on i =3 of 6, unless I disable gc
(readonly code
...))
#+maybe (ext:gc-on)
(check-all-table-entries) ; fails here when GC was disabled during loop


to:
---
(check-all-table-entries) ; [1*]
(ext:gc :full t)
(check-all-table-entries) ; [2*]
(dotimes (i n)
(check-all-table-entries) ; [3*]
(readonly code
...))



Guess what - now it fails in [1*] :o)

I double-check by taking out the forced gc run and it fails in [3*]
again.

Martin
--
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Martin Cracauer <cracauer@xxxxxxxx> http://www.cons.org/cracauer/
No warranty. This email is probably produced by one of my cats
stepping on the keys. No, I don't have an infinite number of cats.




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise