[Vm-dev] byteSizeOf bug?

David T. Lewis lewis at mail.msen.com
Wed Jan 13 13:00:24 UTC 2010


This is the change that we discussed in this thread:

http://lists.squeakfoundation.org/pipermail/vm-dev/2009-December/003563.html

It was applied in SqS/VMMaker-dtl.155 on December 20, 2009.

Apparently I did not test the resulting VM on a 64 bit image :-/

I don't have time to follow up right now, but it's likely that this
change should be reverted, at least until we can sort out the side
effects.

Dave


On Wed, Jan 13, 2010 at 12:58:22AM -0800, John M McIntosh wrote:
> 
> I noted in the current VMMaker  dtl 12/20/2009 21:19 that 
> 
> byteSizeOf: oop
> 	| slots |
> self flag: #Dan.
> 	(self isIntegerObject: oop) ifTrue:[^0].
> 	slots := self slotSizeOf: oop.
> 	(self isBytesNonInt: oop)
> 		ifTrue:[^slots]
> 		ifFalse:[^slots * 4]
> 
> changed to 
> 
> byteSizeOf: oop
> 	| slots |
> self flag: #Dan.
> 	(self isIntegerObject: oop) ifTrue:[^0].
> 	slots := self slotSizeOf: oop.
> 	(self isBytesNonInt: oop)
> 		ifTrue:[^slots]
> 		ifFalse:[^slots * self bytesPerWord]
> 
> So I was trying to build a 64bit VM this evening and it would die in  loadBitBltFromWarping
> where it check to see if the destination bit form has a byteSizeOf() that is equal to pitch * height
> this causes a prim failure before any drawing can occur. 
> 
> In the past if the form was 1,521,520 bytes this altered call returns 3,043,040.
> 
> I assume this is a bug since with the previous code I could build runnable 64bit VMs...?
> 
> Or then again is the bitBitPlugin wrong in it's assumption of slot size? 
> --
> ===========================================================================
> John M. McIntosh <johnmci at smalltalkconsulting.com>   Twitter:  squeaker68882
> Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
> ===========================================================================
> 
> 
> 


More information about the Vm-dev mailing list