bug, possibly in InputStream class

Bryce McKinlay bryce@waitaki.otago.ac.nz
Sun Mar 4 18:42:00 GMT 2001


Benjamin Black wrote:
> instead of exiting main at the end of the tail while loop, as it should
> (and does when run with blackdown's vm), the gcj-compiled version spits
> out a zero and sits patiently without exiting (waiting for the
> apocalypse, no doubt).
>> so i added some test code, and discovered that not only was the read
> method of InputStream not returning -1 when it had read all the input,
> it wasn't reading the full size of the buffer either, but rather 1460
> bytes; setting the buffer to smaller than 1460 is interesting, as with a
> buffer of 1024 bytes, the program reads in 1024 bytes, and then 436
> bytes, followed by 1024 and then 436 bytes, and so on.
>> anyway that is my amateur analysis of where the bug probably is.

What version of gcj are you using? Using recent code from the GCC 3.0 branch I
can not reproduce this. If you are using a recent version, could you post a
URL which exhibits the problem?
thanks
 [ bryce ]


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /