RFR(XS): 8153275: Zero JVM fails to initialize after JDK-8152440

Andrew Hughes gnu.andrew at redhat.com
Wed Apr 6 18:59:33 UTC 2016


----- Original Message -----
> On 04/04/16 18:44, Severin Gehwolf wrote:
> > Hi,
> > 
> > Could somebody please sponsor and review the following Zero-only fix?
> > The fix for JDK-8152440 was incorrect in that it set the value
> > for InitArrayShortSize to an illegal value (-1) failing constraint
> > validation. Albeit not being used it must still pass constraint
> > validation. Otherwise, the JVM fails to initialize and all bets are
> > off. Thoughts?
> > 
> > Bug: https://bugs.openjdk.java.net/browse/JDK-8153275
> > webrev: http://cr.openjdk.java.net/~sgehwolf/webrevs/JDK-8153275/webrev.01/
> 
> OK, but please make the comment clearer.  I didn't understand it.
> 
>  "the allowed range [ 0 ... 9223372036854775807 ]"
> 
> is much clearer.
> 
> Andrew.
> 
> 

Maybe using 2^63-1 for the max range would be even clearer? Or
0x7FFFFFFFFFFFFFFF, which is what is used in globalDefinitions.hpp.

It's also wrong for 32-bit architectures; the range there is 0 ... 0x7FFFFFFF
or 0 ... 2^31-1.

>From globalDefinitions.hpp:

typedef intptr_t  intx;
const intx  min_intx  = (intx)1 << (sizeof(intx)*BitsPerByte-1);
const intx  max_intx  = (uintx)min_intx - 1;
-- 
Andrew :)

Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: ed25519/35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04  C5A0 CFDA 0F9B 3596 4222




More information about the hotspot-dev mailing list