Bug 40953

Critical

GemBuilder for Smalltalk/VW

7.3.1, 7.3, 7.2.2, 7.2.1

Solaris or HP clients with GS/64

7.3.2

SmallDoubles replicated incorrectly to big endian clients

When a GemStone server SmallDouble is replicated from a big-endian server
to a big-endian GBS/VW client, the bytes are read incorrectly from the
buffer, resulting in a wrong SmallDouble on the client.  For example, 0.995
on the server is replicated as -5.0024987722276d-5.

This bug requires both a big-endian server platform (Solaris/Sparc, AIX,
or HP-UX) and a big-endian client (HP-UX or Solaris/Sparc).  Note that
GBS 7.2 and later clients were not supported on Solaris/Sparc for server
versions earlier than 2.4.1, due to an unrelated issue.

Workaround

File in the following to the VW image:

<?xml version="1.0"?>

<st-source>
<methods>
<class-id>GemStone.Gbs.GbxB8BufferOop</class-id> <category>oop access</category>

<body package="GbsServerInterfaceVW" selector="oopShortAt:">oopShortAt: shortOffset
	"Shouldn't really be necessary -- the senders were optimized for C memory access, which is slow,
	so accessing two at a time was faster."
	"Return the unsigned 16-bit chunk of the oop at the given shortOffset, starting from the
	 high order end.  For example, (aDelegate oopShortAt: 1) returns the most
	 significant 16 bits of the receiver's oop."
	
	| byteOffset |
	byteOffset := 2 * (shortOffset - 1).
	^(buffer basicAt: offset + byteOffset) * 16r100
		+ (buffer basicAt: offset + byteOffset + 1)</body>
</methods>
</st-source>


Last updated: 9/22/10