bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/22654] java.io.RandomAccessFile.skipBytes() seeks past EO


From: gcc-bugzilla at gcc dot gnu dot org
Subject: [Bug classpath/22654] java.io.RandomAccessFile.skipBytes() seeks past EOF
Date: 16 Oct 2005 01:26:19 -0000

The Sun javadocs imply that skipBytes() should not skip
past the EOF of a file, and that's the way that JDK 1.4
behaves.  But the Classpath version will seek of into 
the distance.

This bug is exercised by Mauve testcase
    gnu.testlet.java.io.RandomAccessFile.raf.java
which goes into an infinite loop.

The bug is in the native code.  The lseek(2) syscall
can seek beyond the EOF position on Linux.  A 3rd lseek
call is needed to test for this, and a 4th to correct it.


------- Comment #1 from from-classpath at savannah dot gnu dot org  2003-01-26 
15:49 -------
The Mauve test case has changed and I have not reproduced this.  I did however
locate an error related to skipBytes() testing in the new test case and I'll
check that in tomorrow.  The checks for whether to seek and how far to seek are
done in the Java code btw.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22654





reply via email to

[Prev in Thread] Current Thread [Next in Thread]