src/hotspot/share/jvmci/jvmciRuntime.cpp
Index Unified diffs Context diffs Sdiffs Frames Patch New Old Previous File Next File
*** old/src/hotspot/share/jvmci/jvmciRuntime.cpp	Fri May 31 08:53:29 2019
--- new/src/hotspot/share/jvmci/jvmciRuntime.cpp	Fri May 31 08:53:29 2019

*** 936,947 **** --- 936,945 ---- int exception_line = THREAD->exception_line(); CLEAR_PENDING_EXCEPTION; if (exception->is_a(SystemDictionary::ThreadDeath_klass())) { // Don't print anything if we are being killed. } else { java_lang_Throwable::print(exception(), tty); tty->cr(); java_lang_Throwable::print_stack_trace(exception, tty); // Clear and ignore any exceptions raised during printing CLEAR_PENDING_EXCEPTION; }
*** 1395,1409 **** --- 1393,1414 ---- } } else { assert(false, "JVMCICompiler.compileMethod should always return non-null"); } } else { ! // An uncaught exception was thrown during compilation. Generally these // should be handled by the Java code in some useful way but if they leak // through to here report them instead of dying or silently ignoring them. ! // An uncaught exception here implies failure during compiler initialization. + // The only sensible thing to do here is to exit the VM. + + // Only report initialization failure once + static volatile int report_init_failure = 0; + if (!report_init_failure && Atomic::cmpxchg(1, &report_init_failure, 0) == 0) { + tty->print_cr("Exception during JVMCI compiler initialization:"); JVMCIENV->describe_pending_exception(true); compile_state->set_failure(false, "unexpected exception thrown"); + } + JVMCIENV->clear_pending_exception(); + before_exit((JavaThread*) THREAD); + vm_exit(-1); } if (compiler->is_bootstrapping()) { compiler->set_bootstrap_compilation_request_handled(); } }

src/hotspot/share/jvmci/jvmciRuntime.cpp
Index Unified diffs Context diffs Sdiffs Frames Patch New Old Previous File Next File