Output truncated to 512 characters?

Greg Hudson ghudson at MIT.EDU
Sat Mar 6 00:14:36 PST 1999


The README file doesn't make it clear where to report bugs.  I hope
this is okay.

I downloaded the last kaffe snapshot today, built it for Solaris 2.6,
and tested it on some code I wrote recently (a DNS resolver).  It
worked like a charm right up until the output stage, where it tried to
write a 543-byte string using System.out.print().  The output was
truncated to 512 characters.  I looked for 512 in various pieces of
source code and didn't find anything promising.  So I'm reporting it
here.

Just to make sure it isn't dependent on my code, I wrote a little test
program to demonstrate the bug:

class Test {
  public static void main(String[] args) {
    System.out.print("0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789");
  }
}

And here is the output using the Sun JVM and kaffe:

	small-gods% java Test | wc -c
	     610
	small-gods% /var/ghudson/kaffe/bin/java Test | wc -c
	     512


More information about the kaffe mailing list