diff --git a/runtime/compiler/optimizer/J9ValuePropagation.cpp b/runtime/compiler/optimizer/J9ValuePropagation.cpp index b208b30d055..ede01a33826 100644 --- a/runtime/compiler/optimizer/J9ValuePropagation.cpp +++ b/runtime/compiler/optimizer/J9ValuePropagation.cpp @@ -2130,6 +2130,11 @@ J9::ValuePropagation::constrainRecognizedMethod(TR::Node *node) #if defined(J9VM_OPT_METHOD_HANDLE) case TR::java_lang_invoke_PrimitiveHandle_initializeClassIfRequired: { + // The macro J9VMJAVALANGINVOKEPRIMITIVEHANDLE used later + // will access vm information which is not available on the JITServer, + // bypass in this case to prevent an invalid class pointer being retrieved + if (comp()->isOutOfProcessCompilation()) + break; TR::Node* mh = node->getArgument(0); bool mhConstraintGlobal; TR::VPConstraint* mhConstraint = getConstraint(mh, mhConstraintGlobal);