[BC] Block Closures, Version 2 (fwd)

Scott A Crosby crosby at qwes.math.cmu.edu
Fri Feb 15 00:51:12 UTC 2002


As John seems to be having the same trouble.

Scott


---------- Forwarded message ----------
Date: Thu, 14 Feb 2002 15:17:29 -0500 (EST)
From: Scott A Crosby <crosby at qwes.math.cmu.edu>
To: Anthony Hannan <ajh18 at cornell.edu>
Subject: Re: [BC] Block Closures, Version 2

On Thu, 14 Feb 2002, Anthony Hannan wrote:

> Hey Scott,
> 	If its too much of pain to integrate your stuff into BC, just give me
> what you have and I will do it.  It is probably easier for me since I am
> familiar with both the old and new VM.

Nah, my changes are almost completely independent of your stuff.. Mostly
initialization methods and the fact that I split flushMethodCache into two
methods, flushMethodCache&flushAtCache, so anything that flushes caches
must now invoke both manually.  I've done the integration already...

But...  I have a more serious problem..

Stuff is now crashing on me.

Neither your image, nor my translated image works on either of the two
VM's I made. (Either the stock one, updated with your changesets, or my
one where I also integrated my stuff.)

IE, I have two images:
  yours (from the site)
  mine  (from a translation)

and two VM's:
  yours (stock VM+ the changesets on the site)
  mine (the above with my two changesets integrated.)

And no combination of them works..

Both work for a moment; at most a few secods, then die.

--

The problem seems to be corruption in:

    		commonLocalReturn:	/*  */;
    			frameBits4 = longAt(framePointer + (0 * 4));
    			senderOffset4 = (((unsigned) frameBits4) >> 0) &
2044;
    			if (senderOffset4 != 0) {
    				/* begin
internalLoadPreviousFrame:senderOffset: */
    				fp4 = framePointer;
    				localSP = ((char *) (fp4 - ((((unsigned)
frameBits4) >> 10) & 124)));
    				fp4 -= senderOffset4;
    				framePointer = fp4;
    				method = longAt(fp4 + (-1 * 4));
    				localIP = ((char *) ((((longAt(((((char *)
method)) + 4) + (1 << 2))) + (((unsigned) (((unsigned int) frameBits4)))
>> 17)) + 4) - 2));
    			} else {
    				popCallStack();
    				if (callStack == nilObj) {
    					processFinished();
    					/* begin internalizeIPandSP */
    					localIP = ((char *)
instructionPointer);
    					localSP = ((char *) stackPointer);
    					/* begin fetchNextBytecode */
    					currentBytecode =
byteAt(++localIP);
    					goto l34;
    				}
    				/* begin internalLoadStackTopFrame */
    				localSP = ((char *) ((callStack + 4) +
(((4 + (((longAt(((((char *) callStack)) + 4) + (0 << 2))) >> 1))) - 1) *
4)));
    				stackBits4 = longAt(((((char *)
callStack)) + 4) + (1 << 2));
    				framePointer = (callStack + 4) + (((4 +
((((unsigned) stackBits4) >> 1) & 65535)) - 1) * 4);
    				method = longAt(framePointer + (-1 * 4));
    				localIP = ((char *) ((((longAt(((((char *)
method)) + 4) + (1 << 2))) + (((unsigned) (((unsigned int) stackBits4)))
>> 17)) + 4) - 2));
    			}
    			/* begin fetchNextBytecode */
>>>>>>>>>>>>> 		currentBytecode = byteAt(++localIP);
    			longAtput(localSP, localReturnValue);
    		l34:	/* end localReturn */;
    			BREAK;


--

The line, 5th from the end, with the >>>>>> after it.  localIP is
corrupted (and in this case == 0x01fa)

I tried to run with your VM, but its not statically linked and I have
glibc2.1, not 2.2, and can't run it.

Scott







More information about the Squeak-dev mailing list