[GOODIE] address checker (was Re: [SOLVED?] (was Re: [BUG HUNT!]ImageSegment loading troubles revisited))

David T. Lewis lewis at mail.msen.com
Sun Jul 4 16:23:24 UTC 2004


I've attached a little plugin that will hopefully confirm the diagnosis on
a machine that has this problem (mine does not). From the preamble:

A plugin and utility methods to check the values of the address of the start
of object memory and the address of the end of object memory. Check to ensure
that these values are not too large to be represented as positive signed
integers in the underlying machine architecture.

Build the plugin with VMMaker (and rebuild the interpreter). Then try evaluating:

	MemoryAddressesPlugin addresses
	MemoryAddressesPlugin isBaseMemoryAddressTooBig
	MemoryAddressesPlugin isEndOfMemoryAddressTooBig


On Fri, Jul 02, 2004 at 09:20:43AM -0700, John M McIntosh wrote:
> Well if linux 2.6 loaded the image over the 2  GB boundary you would  
> crash right away when you swizzle the oops at start up time.
> What you should do is put a break point in the memory allocation logic  
> that is responsible for growing the image and see when
> the pointer goes negative as it's being adjusted after a grow/shrink.
> 
> You could also check what the start of memory location is, since I  
> recall the unix VM wants to allocate 1GB, so does start of memory plus
> 1GB > 2GB?

Yes, I think this is correct. Start of object memory on my system is
16r402E0000, so if I had enough memory to run a 1GB image, I expect that
horrible things would happen.

> On Jul 2, 2004, at 8:13 AM, goran.krampe at bluefish.se wrote:
> > It appears to me in insight/gdb that foo->endOfMemory is negative (sign
> > bit gotten set?) so the interval check that looks like this:
> >
> >         if (!((0 < oop) && (oop < foo->endOfMemory))) {
> >                 return 0;
> >         }
> >
> > ...fails.
> >
> > Hmmm, ok - so has this worked until now just because of luck? Has  
> > memory
> > normally been mapped below 32 bits, and now with kernel 2.6 (for
> > example) Linux decides to place Squeak above it sometimes? And is the
> > problem simply that we can't treat endOfMemory as a signed int?!

Goran, I don't know if kernel 2.6 is different. I'm still running 2.4
on my system. I looked at the pngs that you posted, and it does look
like your system may be different.

> > And did
> > Greece really go to the Euro championship soccer final yesterday? It
> > seems so.

Well, it all seems related to the underlying uncertainty of the universe,
so this might very well have a bearing on the image segment problem ;)

Dave

-------------- next part --------------
A non-text attachment was scrubbed...
Name: CheckMemoryAddresses-dtl.1.cs.gz
Type: application/x-gunzip
Size: 1019 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040704/d997b80f/CheckMemoryAddresses-dtl.1.cs.bin


More information about the Squeak-dev mailing list