RFR (XXS) JDK-8139768 Running with -XX:CMSOldPLABNumRefills=2147483648 causes EXCEPTION_INT_DIVIDE_BY_ZERO on Windows i586

Stefan Karlsson stefan.karlsson at oracle.com
Wed Dec 9 19:51:16 UTC 2015


Hi Joe,

On 2015-12-09 19:30, Joseph Provino wrote:
> Please review this very small change.
>
> CR: https://bugs.openjdk.java.net/browse/JDK-8139768
>
> Webrev:  http://cr.openjdk.java.net/~jprovino/8139768/webrev.00

The rest of the file uses // for the comments. Could you change your 
comment to be consistent with the rest of the file?

    // Lacking sufficient experience, CMSOldPLABResizeQuicker is disabled by
    // default.
    if (ResizeOldPLAB && CMSOldPLABResizeQuicker) {
-    size_t multiple = _num_blocks[word_sz]/(CMSOldPLABToleranceFactor*CMSOldPLABNumRefills*n_blks);
+    /*
+     * On a 32-bit VM, the denominator can become zero before of integer overflow
+     * which is why there is cast to double.
+     */
+    size_t multiple = (size_t) (_num_blocks[word_sz]/((double)CMSOldPLABToleranceFactor*CMSOldPLABNumRefills*n_blks));


Thanks,
StefanK
>
> thanks.
>
> joe

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20151209/5cb0529d/attachment.htm>


More information about the hotspot-gc-dev mailing list