RFR(xs): 8145192: 'count' variable can overflow in PSMarkSweep::invoke on 64 bit JVM

sangheon sangheon.kim at oracle.com
Fri Jan 22 19:56:44 UTC 2016


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 
numbers(>max_juint).
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[1]

[1]: Call System.gc() with VM option of '-XX:+UseParallelGC 
-XX:-UseParallelOldGC -XX:MarkSweepAlwaysCompactCount=4294967296' 
(=max_juint + 1).

Thanks,
Sangheon



More information about the hotspot-gc-dev mailing list