-
Notifications
You must be signed in to change notification settings - Fork 722
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
Set module to Java.base before java.base is created. #2845
Conversation
f3799fe
to
c6fca26
Compare
runtime/vm/createramclass.cpp
Outdated
} else { | ||
module = javaVM->unamedModuleForSystemLoader; | ||
} | ||
module = javaVM->javaBaseModule; |
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.
Can you add a comment explaining why we chose this behaviour? Once there's a comment here I'm good with the change.
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.
Comment added
runtime/vm/createramclass.cpp
Outdated
} | ||
/* Do not assign module based on locationType, as we never set locationType for anonymous classes which led us to assign them to | ||
* unamedModuleForSystemLoader incorrectly. Change the code to directly assign classes to Java.base here. | ||
*/ |
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.
This isn't quite the comment I was expecting as the situation is more broad than anonymous classes, which are correctly assigned the hostClass->module
after java.base is created.
Maybe something more along the lines of:
Ignore locationType and assign all classes created before the java.base module is created to java.base.
This matches the RI implementation. Validated on JDK9 through JDK11.
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.
Updated.
Fixes eclipse-openj9#2839 Signed-off-by: hangshao <hangshao@ca.ibm.com>
Jenkins test sanity plinux jdk10 |
@DanHeidinga , seems that sanity plinux jdk10 build is not triggered. |
Jenkins test sanity plinux jdk10 |
@AdamBrousseau The PR builds don't appear to work on this PR. Any insight? |
Jenkins copyright check |
Jenkins line endings check |
Jenkins test sanity plinux jdk10 |
Fixes #2839
Signed-off-by: hangshao hangshao@ca.ibm.com