changeset 8361:21f9f80ecde2

8069005: Hotspot crashes in System.out.println with assert(resolved_method->method_holder()->is_linked()) failed: must be linked Summary: move java.lang.Class initialization sooner in bootstrapping the jvm Reviewed-by: dholmes, hseigel
author coleenp
date Tue, 05 May 2015 16:09:30 -0400
parents 98faabe210e9
children 08b5dfe9bcb5 465e5b2bb615 9e4e37a2432d
files src/share/vm/runtime/thread.cpp
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/runtime/thread.cpp	Thu Apr 23 18:00:50 2015 +0200
+++ b/src/share/vm/runtime/thread.cpp	Tue May 05 16:09:30 2015 -0400
@@ -3230,6 +3230,8 @@
 
   // Initialize java_lang.System (needed before creating the thread)
   initialize_class(vmSymbols::java_lang_System(), CHECK);
+  // The VM creates & returns objects of this class. Make sure it's initialized.
+  initialize_class(vmSymbols::java_lang_Class(), CHECK);
   initialize_class(vmSymbols::java_lang_ThreadGroup(), CHECK);
   Handle thread_group = create_initial_thread_group(CHECK);
   Universe::set_main_thread_group(thread_group());
@@ -3241,9 +3243,6 @@
   java_lang_Thread::set_thread_status(thread_object,
                                       java_lang_Thread::RUNNABLE);
 
-  // The VM creates & returns objects of this class. Make sure it's initialized.
-  initialize_class(vmSymbols::java_lang_Class(), CHECK);
-
   // The VM preresolves methods to these classes. Make sure that they get initialized
   initialize_class(vmSymbols::java_lang_reflect_Method(), CHECK);
   initialize_class(vmSymbols::java_lang_ref_Finalizer(), CHECK);