[9] [XXS] RFR 8137121: (ch) Infinite loop in sun.nio.ch.FileChannelImpl.truncate
Ivan Gerasimov
ivan.gerasimov at oracle.com
Fri Sep 25 17:00:36 UTC 2015
Thank you Alan!
I'll incorporate all your suggestions before pushing the fix.
Sincerely yours,
Ivan
On 25.09.2015 16:46, Alan Bateman wrote:
> On 25/09/2015 14:27, Ivan Gerasimov wrote:
>> Hello!
>>
>> A long result of a call to position0 is blindly cast to int, which
>> may accidentally result in (-3) special value.
>> Would you please help review the fix?
>>
>> BUGURL: https://bugs.openjdk.java.net/browse/JDK-8137121
>> WEBREV: http://cr.openjdk.java.net/~igerasim/8137121/00/webrev/
> The fix looks okay. I guess I would use rp rather than rl.
>
> Can you move the test into FileChannel directory? LoopingTruncate
> might be a a better name for the test.
>
> A minor comment is this might fit better on L51:
>
> try (FileChannel fc = FileChannel.open(path, CREATE, WRITE)) {
>
> -Alan
>
More information about the nio-dev
mailing list