RFR(xs): 8145192: 'count' variable can overflow in PSMarkSweep::invoke on 64 bit JVM
tom.benson at oracle.com
Fri Jan 22 20:52:17 UTC 2016
I think it would be *slightly* more logical to instead reduce
MarkSweepAlwaysCompactCount to a uint, since there should be no need for
it to be anywhere near even that large. But I don't feel too strongly,
and that would require changing the test.
So, the change looks OK to me.
On 1/22/2016 2:56 PM, sangheon wrote:
> Hi all,
> Could I have reviews for this tiny change to avoid zero division?
> 'uintx' type flag 'MarkSweepAlwaysCompactCount' is used to set 'uint'
> type local variable and this would result in an overflow for big
> As a solution, this local variable should be changed to 'uintx'.
> I didn't add a new test as JDK-8144578 enables to check this problem.
> CR: https://bugs.openjdk.java.net/browse/JDK-8145192
> Webrev: http://cr.openjdk.java.net/~sangheki/8145192/webrev.00
> Testing: JPRT, manual test
> : Call System.gc() with VM option of '-XX:+UseParallelGC
> -XX:-UseParallelOldGC -XX:MarkSweepAlwaysCompactCount=4294967296'
> (=max_juint + 1).
More information about the hotspot-gc-dev