Bug and patch

Gilles Dauphin dauphin at sig.enst.fr
Sat Mar 15 10:37:28 PST 1997


> From vijay at webpage.com Fri Mar 14 22:21:29 1997 
> 
> On the other problem, however, I think you may be
> looking at a false alarm. Here is my analysis.
> 
> in ...
> > walkObject(gcInfo* base)
> 
> You said ...
> 
> >                 obj = MEM2GC(mem[i]);			<---- PROBLEM HERE
> 
> What your memory tool is probably catching is an UMR
> (or equiv) Uninit Mem Read ... or something that says you
> are reading from where you should not, because you did not write
> to it to begin with.
> 
> Thats fine ... that is how the GC alg works, its scanning for
> anything in there that *may* point to an object. Many of the
> things it points to are not objects (since they are often not
> even pointers) ... so you'd get garbage (probably triggering
> a memory access tool in the process) but then you'd
> catch it in the next line in the source ...
> 
> >                 /* Check we've got a valid object */
> >                 if (((void*)obj < minMem || (void*)obj > maxMem) ||
> >                     (((uintp)obj % sizeof(void*)) != 0) ||
> >                     (!VALIDREF(obj->ref)) ||	       <------PROBLEM HERE
> >                     (GETREF(obj->ref) != (uintp)obj)) { <-----PROBLEM HERE
> >                         continue;
> 
> So, it is not that you are assuming that it *is* a gcInfo, you
> are checking to see whether is is a gcInfo there. Thats fine,
> and the places you have PROBLEM HERE are what should in
> fact trigger the continue.
> 
> If anyone feels my analysis is incorrect, please let me know.

The debugger check say : Read From Unallocated. (It is very different 
than Read From Uninitialize).

I think it is a dangerous message. I give you more information
If you needed it.

Gilles


More information about the kaffe mailing list