8251923: "Invalid JNI handle" assertion failure in JVMCICompiler::force_comp_at_level_simple()

Reviewed-by: kvn, dnsimon
This commit is contained in:
Nick Gasson 2020-08-20 09:32:01 +08:00
parent 49e7609da2
commit b9a37e48e2

View File

@ -893,8 +893,11 @@ void JVMCIRuntime::initialize_HotSpotJVMCIRuntime(JVMCI_TRAPS) {
// This should only be called in the context of the JVMCI class being initialized
JVMCIObject result = JVMCIENV->call_HotSpotJVMCIRuntime_runtime(JVMCI_CHECK);
result = JVMCIENV->make_global(result);
OrderAccess::storestore(); // Ensure handle is fully constructed before publishing
_HotSpotJVMCIRuntime_instance = result;
_HotSpotJVMCIRuntime_instance = JVMCIENV->make_global(result);
JVMCI::_is_initialized = true;
}