RFR: 8186502: Assert when range testing G1RefProcDrainInterval on 64-bit systems

Leo Korinth leo.korinth at oracle.com
Fri Nov 3 09:24:58 UTC 2017


Hi,

Fix range checking when using -XX:G1RefProcDrainInterval=n

On 64 bit machines, when issuing extremly large integer arguments
to -XX:G1RefProcDrainInterval=n, a 32 bit integer will overflow and
cause a crash.

First I have improved the tests by adding the flag
-XX:+ExplicitGCInvokesConcurrent when testing the flag
-XX:G1RefProcDrainInterval=n to trigger the fault in our
test suit.

Then I have fixed the fault by limiting the arguments on 64 bit
systems (using an int type instead of intx type and a range up to
only INT_MAX for argument parsing).

Bug:
https://bugs.openjdk.java.net/browse/JDK-8186502

Webrev:
http://cr.openjdk.java.net/~lkorinth/8186502/00/

Testing:
- JPRT

Thanks,
Leo


More information about the hotspot-gc-dev mailing list