Re: Code review request "6402006: FileInputStream.available() returns negative values when reading a large file"

2010-12-01 Thread Mandy Chung
On 12/01/10 13:39, Alan Bateman wrote: Mandy Chung wrote: Mike, Alan, I have updated the fix to use GetFileSizeEx() and SetFilePointerEx(). Also add a regression test that creates a large sparse file. Webrev at: http://cr.openjdk.java.net/~mchung/6402006/webrev.01/ This looks much bet

Re: Code review request "6402006: FileInputStream.available() returns negative values when reading a large file"

2010-12-01 Thread Alan Bateman
Mandy Chung wrote: Mike, Alan, I have updated the fix to use GetFileSizeEx() and SetFilePointerEx(). Also add a regression test that creates a large sparse file. Webrev at: http://cr.openjdk.java.net/~mchung/6402006/webrev.01/ This looks much better, and the implementation changes looks

Re: Code review request "6402006: FileInputStream.available() returns negative values when reading a large file"

2010-12-01 Thread Mandy Chung
Mike, Alan, I have updated the fix to use GetFileSizeEx() and SetFilePointerEx(). Also add a regression test that creates a large sparse file. Webrev at: http://cr.openjdk.java.net/~mchung/6402006/webrev.01/ Thanks Mandy On 11/18/10 13:43, Mandy Chung wrote: 6402006 FileInputStream.avai

Re: Code review request "6402006: FileInputStream.available() returns negative values when reading a large file"

2010-11-19 Thread Mandy Chung
On 11/19/10 2:11 AM, Alan Bateman wrote: I agree with Mike's suggestion to use GetFileSizeEx. Also, well spotted that the SetFilePointer usage is missing a check to GetLastError. I quickly checked the other usages of this clunky API and they seem to check the error. I'll send out a new webr

Re: Code review request "6402006: FileInputStream.available() returns negative values when reading a large file"

2010-11-19 Thread Alan Bateman
Mike Duigou wrote: Would it be possible to call GetFileSizeEx() (or add a call to GetLastError()) MSDN: Note that if the return value is INVALID_FILE_SIZE (0x), an application must call GetLastError to determine whether the function has succeeded or failed. The reason the function

Re: Code review request "6402006: FileInputStream.available() returns negative values when reading a large file"

2010-11-18 Thread Mike Duigou
Would it be possible to call GetFileSizeEx() (or add a call to GetLastError()) MSDN: > Note that if the return value is INVALID_FILE_SIZE (0x), an > application must call GetLastError to determine whether the function has > succeeded or failed. The reason the function may appear to fail

Code review request "6402006: FileInputStream.available() returns negative values when reading a large file"

2010-11-18 Thread Mandy Chung
6402006 FileInputStream.available() returns negative values when reading a large file Webrev at: http://cr.openjdk.java.net/~mchung/6402006/webrev.00/ This fixes a bug in the windows implementation of io_util.c that ignores the high-order doubleword of the file size in computing the end of t