Code review request "6402006: FileInputStream.available() returns negative values when reading a large file"
Mandy Chung
mandy.chung at oracle.com
Fri Nov 19 15:46:07 UTC 2010
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 webrev.
> Do you plan to include a regression test for this? I know it's not
> nice for tests to be create multi-GB files but this is one that we
> should have caught a long time ago. If we create it as a sparse file
> then the test should be relatively quick.
I have a regression test but didn't plan to include in the changeset.
I'll modify it to create a sparse file as you suggest and include it in
the webrev.
Thanks
Mandy
More information about the core-libs-dev
mailing list