src/share/vm/runtime/thread.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot-comp Cdiff src/share/vm/runtime/thread.cpp

src/share/vm/runtime/thread.cpp

Print this page
rev 5067 : 8022595: JSR292: deadlock during class loading of MethodHandles, MethodHandleImpl & MethodHandleNatives
Reviewed-by:

*** 3634,3643 **** --- 3634,3653 ---- // initialize compiler(s) #if defined(COMPILER1) || defined(COMPILER2) || defined(SHARK) CompileBroker::compilation_init(); #endif + if (EnableInvokeDynamic) { + // Pre-initialize some JSR292 core classes to avoid deadlock during class loading. + // It is done after compilers are initialized, because otherwise compilations of + // signature polymorphic MH intrinsics can be missed + // (see SystemDictionary::find_method_handle_intrinsic). + initialize_class(vmSymbols::java_lang_invoke_MethodHandle(), CHECK_0); + initialize_class(vmSymbols::java_lang_invoke_MemberName(), CHECK_0); + initialize_class(vmSymbols::java_lang_invoke_MethodHandleNatives(), CHECK_0); + } + #if INCLUDE_MANAGEMENT Management::initialize(THREAD); #endif // INCLUDE_MANAGEMENT if (HAS_PENDING_EXCEPTION) {
src/share/vm/runtime/thread.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File