This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: bug, possibly in InputStream class
- To: Benjamin Black <bhb8 at columbia dot edu>
- Subject: Re: bug, possibly in InputStream class
- From: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- Date: Mon, 05 Mar 2001 15:51:04 +1300
- CC: java at gcc dot gnu dot org
- References: <3AA2F005.8020700@columbia.edu>
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 ]