This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: bug, possibly in InputStream class


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 ]



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]