RFR (S): 8004018: Remove old initialization flags

David Holmes david.holmes at oracle.com
Fri Jan 11 00:37:02 PST 2013


Hi Erik,

On 11/01/2013 4:46 PM, Erik Helin wrote:
> Hi all,
>
> this change removes the three developer flags:
> - InitializeJavaLangSystem
> - InitializeJavaLangString
> - InitializeJavaLangExceptionsErrors

While these were probably useful a long time I don't see the value in 
keeping them now - especially as they have been left to bit-rot. ASnyone 
debugging initialization order issues will undoubtedly need more than 
just these flags.

> The flags InitializeJavaLangSystem and InitalizeJavaLangString crashes
> the VM when they are set to false (see Testing).

Right. The initialization order is very fragile, if you change it by 
turning off these flags then something will break. The typical failure 
mode these days is trying to throw an exception too soon, which fails 
because java.lang.Class has not be "linked" yet.

> The flag (InitializeJavaLangExceptionsErrors) does not crash the VM when
> just running "-version". The RFE suggests that it should be removed, so
> I went ahead and removed it. Should we keep it?

No. I think you will find this only fails to crash the VM due to a 
recent change to the initialization order.

David
-----

>
> Webrev:
> http://cr.openjdk.java.net/~ehelin/8004018/webrev.00/
>
> RFE:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8004018
>
> Testing:
> Running a fastdebug build results in the following:
>
> java -XX:-InitializeJavaLangSystem -version
> # A fatal error has been detected by the Java Runtime Environment
> # Internal Error (linkResolver.cpp:902)
> # assert(resolved_method->method_holder()->is_linked()) failed: must be
> linked
>
> java -XX:-InitializeJavaLangString -version
> # A fatal error has been detected by the Java Runtime Environment
> # Internal Error (linkResolver.cpp:902)
> # assert(resolved_method->method_holder()->is_linked()) failed: must be
> linked
>
> JPRT
>
> Thanks,
> Erik


More information about the hotspot-runtime-dev mailing list