Skip to content
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

Merged
merged 1 commit into from
Sep 14, 2018

Conversation

hangshao0
Copy link
Contributor

Fixes #2839

Signed-off-by: hangshao hangshao@ca.ibm.com

@hangshao0 hangshao0 changed the title Set loadLocationType for Java.base to LOAD_LOCATION_MODULE Set module to hostClass module if J9_FINDCLASS_FLAG_ANON is set Sep 12, 2018
@hangshao0 hangshao0 changed the title Set module to hostClass module if J9_FINDCLASS_FLAG_ANON is set WIP: Set module to hostClass module if J9_FINDCLASS_FLAG_ANON is set Sep 13, 2018
} else {
module = javaVM->unamedModuleForSystemLoader;
}
module = javaVM->javaBaseModule;
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment added

@DanHeidinga DanHeidinga self-assigned this Sep 14, 2018
@hangshao0 hangshao0 changed the title WIP: Set module to hostClass module if J9_FINDCLASS_FLAG_ANON is set Set module to Java.base before java.base is created. Sep 14, 2018
}
/* 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.
*/
Copy link
Member

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.

Copy link
Contributor Author

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>
@DanHeidinga
Copy link
Member

Jenkins test sanity plinux jdk10

@hangshao0
Copy link
Contributor Author

@DanHeidinga , seems that sanity plinux jdk10 build is not triggered.

@DanHeidinga
Copy link
Member

Jenkins test sanity plinux jdk10

@DanHeidinga
Copy link
Member

@AdamBrousseau The PR builds don't appear to work on this PR. Any insight?

@AdamBrousseau
Copy link
Contributor

Jenkins copyright check

@AdamBrousseau
Copy link
Contributor

Jenkins line endings check

@AdamBrousseau
Copy link
Contributor

Jenkins test sanity plinux jdk10

@DanHeidinga DanHeidinga merged commit 03219bd into eclipse-openj9:master Sep 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants