8069005: Hotspot crashes in System.out.println with assert(resolved_method->method_holder()->is_linked()) failed: must be linked

Move java.lang.Class initialization sooner in bootstrapping the jvm

Reviewed-by: dholmes, hseigel
This commit is contained in:
Coleen Phillimore 2015-05-05 16:09:30 -04:00
parent 301298546c
commit c6e557977e

View file

@ -3230,6 +3230,8 @@ void Threads::initialize_java_lang_classes(JavaThread* main_thread, TRAPS) {
// 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 @@ void Threads::initialize_java_lang_classes(JavaThread* main_thread, TRAPS) {
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);