--- old/src/hotspot/share/jvmci/jvmciRuntime.cpp 2019-05-04 16:22:37.753530092 -0700 +++ new/src/hotspot/share/jvmci/jvmciRuntime.cpp 2019-05-04 16:22:36.496528218 -0700 @@ -655,7 +655,7 @@ // private static JVMCIRuntime JVMCI.initializeRuntime() JVM_ENTRY_NO_ENV(jobject, JVM_GetJVMCIRuntime(JNIEnv *env, jclass c)) - JNI_JVMCIENV(env); + JNI_JVMCIENV(thread, env); if (!EnableJVMCI) { JVMCI_THROW_MSG_NULL(InternalError, "JVMCI is not enabled"); } @@ -877,7 +877,7 @@ fatal("check TLAB allocation code for address space conflicts"); #endif - JNI_JVMCIENV(env); + JNI_JVMCIENV(thread, env); if (!EnableJVMCI) { JVMCI_THROW_MSG(InternalError, "JVMCI is not enabled"); @@ -1353,6 +1353,10 @@ compile_state->set_failure(true, "No OSR during boostrap"); return; } + if (JVMCI::shutdown_called()) { + compile_state->set_failure(false, "Avoiding compilation during shutdown"); + return; + } HandleMark hm; JVMCIObject receiver = get_HotSpotJVMCIRuntime(JVMCIENV);