Skip to content

Commit

Permalink
Merge pull request #3 from Graham-Chapman/ibm_sdk
Browse files Browse the repository at this point in the history
Align ClassLoader and signature data in loading constraint
  • Loading branch information
gacholio authored and GitHub Enterprise committed Oct 16, 2017
2 parents a88bfa7 + 24a0de9 commit aa8e68e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions runtime/vm/resolvesupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1174,14 +1174,15 @@ resolveSpecialMethodRefInto(J9VMThread *vmStruct, J9ConstantPool *ramCP, UDATA c
J9JavaVM *vm = vmStruct->javaVM;
if (vm->runtimeFlags & J9_RUNTIME_VERIFY) {
J9Class *selectedMethodClass = J9_CLASS_FROM_METHOD(method);
J9ClassLoader * cl1 = resolvedMethodClass->classLoader;
J9ClassLoader * cl1 = currentClass->classLoader;
J9ClassLoader * cl2 = selectedMethodClass->classLoader;
if (cl1 != cl2) {
J9UTF8 *signature = J9ROMNAMEANDSIGNATURE_SIGNATURE(nameAndSig);
if (0 != j9bcv_checkClassLoadingConstraintsForSignature(vmStruct, cl1, cl2, signature, signature)) {
J9UTF8 *selectedSig = J9ROMMETHOD_SIGNATURE(J9_ROM_METHOD_FROM_RAM_METHOD(method));
if (0 != j9bcv_checkClassLoadingConstraintsForSignature(vmStruct, cl1, cl2, signature, selectedSig)) {
if (0 == jitFlags) {
J9UTF8 *name = J9ROMNAMEANDSIGNATURE_NAME(nameAndSig);
setClassLoadingConstraintSignatureError(vmStruct, cl1, resolvedMethodClass, cl2, selectedMethodClass, resolvedMethodClass, J9UTF8_DATA(name), J9UTF8_LENGTH(name), J9UTF8_DATA(signature), J9UTF8_LENGTH(signature));
setClassLoadingConstraintSignatureError(vmStruct, cl1, currentClass, cl2, selectedMethodClass, resolvedMethodClass, J9UTF8_DATA(name), J9UTF8_LENGTH(name), J9UTF8_DATA(signature), J9UTF8_LENGTH(signature));
}
method = NULL;
goto done;
Expand Down

0 comments on commit aa8e68e

Please sign in to comment.