RFR [7129312] BufferedInputStream calculates negative array size with large streams and mark

Ivan Gerasimov ivan.gerasimov at oracle.com
Tue Aug 20 16:01:36 UTC 2013


Thank you Alan!

> The update to BufferedInputStream looks okay to me. I guess we don't 
> actually need to check the size in the constructor, OOME will be 
> thrown anyway. Usually constants are in uppercase and maybe we should 
> just do this while we are here (so this means rename defaultBufferSize 
> too).
>
Removed the unnecessary check and renamed the constants.

> I'm in two minds about the test as reserving 4GB of heap is going to 
> be a problem on some systems (32-bit mostly).
>
Yes, you're right!
I've updated the test to be a shell script + Java application.
If java reported 'Invalid maximum heap size', the test is skipped.

Just check with JPRT, the test passes on both 64 and 32 bit platforms.

Would you please review the updated webrev?
http://cr.openjdk.java.net/~igerasim/7129312/2/webrev/ 
<http://cr.openjdk.java.net/%7Eigerasim/7129312/2/webrev/>

Sincerely yours,
Ivan


> -Alan.
>
>
>
>




More information about the core-libs-dev mailing list