-
Notifications
You must be signed in to change notification settings - Fork 738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid checking the class loading constraints with -Xverify:none #5265
Avoid checking the class loading constraints with -Xverify:none #5265
Conversation
The fix was verified by the external user. Reviewer: @DanHeidinga |
runtime/vm/createramclass.cpp
Outdated
@@ -601,7 +603,7 @@ addInterfaceMethods(J9VMThread *vmStruct, J9ClassLoader *classLoader, J9Class *i | |||
if (NULL != methodClass) { | |||
vTableMethodLoader = methodClass->classLoader; | |||
} | |||
if (interfaceLoader != vTableMethodLoader) { | |||
if ((interfaceLoader != vTableMethodLoader) && verifierLoaded) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The verifierLoaded
check should be bubbled up to line 601. We don't need to do any of the work in this block other if the verifier is disabled - just the goto continueInterfaceScan;
is relevant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed and moved it to line 601 as suggested.
runtime/vm/createramclass.cpp
Outdated
@@ -454,6 +454,8 @@ addInterfaceMethods(J9VMThread *vmStruct, J9ClassLoader *classLoader, J9Class *i | |||
J9Method **vTableMethods = J9VTABLE_FROM_HEADER(vTableAddress); | |||
J9ROMClass *interfaceROMClass = interfaceClass->romClass; | |||
UDATA count = interfaceROMClass->romMethodCount; | |||
bool verifierLoaded = J9_ARE_ANY_BITS_SET(vmStruct->javaVM->runtimeFlags, J9_RUNTIME_VERIFY); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
verifierLoaded
-> verifierEnabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already renamed to verifierEnabled
runtime/vm/createramclass.cpp
Outdated
@@ -1250,7 +1253,7 @@ processVTableMethod(J9VMThread *vmThread, J9ClassLoader *classLoader, UDATA *vTa | |||
} | |||
/* fill in vtable, override parent slot */ | |||
J9ClassLoader *superclassVTableMethodLoader = superclassVTableMethodClass->classLoader; | |||
if (superclassVTableMethodLoader != classLoader) { | |||
if ((superclassVTableMethodLoader != classLoader) && verifierLoaded) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move the check out to include line 1255 as well. I'd rather deal with an extra level indenting if it gives simpler to reason about code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already adjusted the scope of check as suggested.
The change is to avoid checking the class loading contraints when the verifier is disabled by -Xverify:none. Close: eclipse-openj9#4904 Signed-off-by: Cheng Jin <jincheng@ca.ibm.com>
e2c4592
to
88c2e40
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Great job tracking this down @ChengJin01 !
Jenkins test sanity zlinux jdk8 |
@ChengJin01 Can you create a PR for this change against the v0.14.0-release branch as well as we've already split for that release. |
@DanHeidinga , the PR for 0.14.0 has been created at #5272. |
The change is to avoid checking the class loading constraints
when the verifier is disabled by -Xverify:none.
Close: #4904
Signed-off-by: Cheng Jin jincheng@ca.ibm.com