Bug 34456

GemStone/S

6.1.6, 6.1.5

All

6.2

Compiler problems with DoubleByteStrings

Due to a logic error introduced in 6.1.5, attempts to compile GemStone
Smalltalk code contained in a DoubleByteString will fail when the code
includes a String or Symbol token that contains only single byte characters
and has a length of more than 20 characters.  The failures may range from
incorrect compiled code, inappropriate compiler errors, or even crashes
with core dumps of the gem / topaz process during the compilation process.
This applies to code compiled via topaz / GBS as well as programmatically
via Behavior>>compileMethod:dictionaries:category: and associated methods.

Workaround

If the code must include a DoubleByteString, move that string into a
separate method.  Keep the name of the method short (20 characters or less),
and make sure that any single byte Strings or Symbols within that method
are also 20 characters or less.  Compile this method separately from others.
This will allow the other methods to be represented using single byte
strings and avoid the problem.  Modify the original code to call the
new method as appropropriate.

Alternatively, modify code to avoid having any Strings or Symbols that
contain more than 20 characters (use concatenation to assemble a longer
string during execution).

Carefully test to confirm correct compilation and execution.


Last updated: 3/27/06