Bug in java.io.InputStreamReader

Seth Golub seth@thehouse.org
Thu May 6 12:37:00 GMT 1999


I have egcs-2.93.19 and libgcj (I don't know how to determine the
version number, but the most recent entry in Changelog is dated
1999-04-26).

java.io.InputStreamReader.read() works fine the first 100 times I call
it, but on the 101st call it gets stuck in a loop somewhere.
InputStreamReader uses an internal buffer of 100 bytes, so it seems
likely that the problem is in what it does when that runs out.

I've included a small test program, a Makefile, and two minimally
different sample inputs (100 and 101 bytes long).  They both work fine
with Kaffe or JDK, but the 101 byte input causes the problem reliably
with a compiled version of the test program.

I'm sorry I wasn't able to pinpoint the problem more precisely, but I
hope this is enough to let someone else solve it quickly (and I hope
someone else is interested in doing so).




More information about the Java mailing list