diff -r f2c23221bbd5 -r d9b46b7de028 src/hotspot/share/runtime/thread.cpp --- a/src/hotspot/share/runtime/thread.cpp Fri Apr 05 07:10:07 2019 -0400 +++ b/src/hotspot/share/runtime/thread.cpp Fri Apr 05 10:01:09 2019 +0100 @@ -3628,6 +3628,7 @@ initialize_class(vmSymbols::java_lang_Thread(), CHECK); oop thread_object = create_initial_thread(thread_group, main_thread, CHECK); main_thread->set_threadObj(thread_object); + // Set thread status to running since main thread has // been started and running. java_lang_Thread::set_thread_status(thread_object, @@ -3636,6 +3637,15 @@ // The VM creates objects of this class. initialize_class(vmSymbols::java_lang_Module(), CHECK); +#ifdef ASSERT + InstanceKlass *k = SystemDictionary::UnsafeConstants_klass(); + assert(k->is_not_initialized(), "UnsafeConstants should not already be initialized"); +#endif + + // initialize the hardware-specific constants needed by Unsafe + initialize_class(vmSymbols::jdk_internal_misc_UnsafeConstants(), CHECK); + jdk_internal_misc_UnsafeConstants::set_unsafe_constants(); + // 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);