[Vm-dev] newDelta >0 failed in sqUnixMemory

David T. Lewis lewis at mail.msen.com
Fri Jan 30 17:07:20 UTC 2009


On Fri, Jan 30, 2009 at 02:07:33PM +0100, Damien Cassou wrote:
>  
> On Fri, Jan 30, 2009 at 9:00 AM, Andreas Raab <andreas.raab at gmx.de> wrote:
> > Since you're compiling the VM yourself, you might want to add a guard that
> > catches the condition and prints out the environmental values (oldLimit,
> > delta, newSize, newDelta). I would suspect that this is a signed/unsigned
> > issue with memory being allocated somewhere close to the 2GB barrier and
> > then flipping from positive to negative. Since newSize and newDelta are
> > declared int, this could easily happen.
> 
> Here is the result of:
> 
> fprintf(stderr, "oldLimit=%p\ndelta=%d\nnewSize=%d\nnewDelta=%d\n");
> 
> oldLimit=0x80562b8
> delta=-1077506096
> newSize=0
> newDelta=423027548
> squeak: /tmp/squeak-svn/platforms/unix/vm/sqUnixMemory.c:175:
> uxGrowMemoryBy: Assertion `newDelta >= 0' failed.
> 
> Does it help?

Yes. I don't think newSize is supposed to be 0 here.

      int newSize=  min(valign(oldLimit - heap + delta), heapLimit);
      int newDelta= newSize - heapSize;

I'm not sure what is wrong, but apparently it's in the expression
"min(valign(oldLimit - heap + delta), heapLimit)".

Dave



More information about the Vm-dev mailing list