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

Open modules export all packages just like unnamed modules #1995

Merged
merged 1 commit into from
May 25, 2018

Conversation

DanHeidinga
Copy link
Member

@DanHeidinga DanHeidinga commented May 25, 2018

Update the isPackageExportedToModuleHelper function to treat open
modules exactly like unnamed ones. All packages in such modules
should be treated as exported.

fixes #1789

Signed-off-by: Dan Heidinga daniel_heidinga@ca.ibm.com

Update the `isPackageExportedToModuleHelper` function to treat open
modules exactly like unnamed ones.  All packages in such modules
should be treated as exported.

issue eclipse-openj9#1789

Signed-off-by: Dan Heidinga <daniel_heidinga@ca.ibm.com>
@DanHeidinga
Copy link
Member Author

Marking as "WIP" as I'm having trouble re-building the petclinic modularity demo to validate this change.

@DanHeidinga DanHeidinga changed the title WIP: Open modules export all packages just like unnamed modules Open modules export all packages just like unnamed modules May 25, 2018
@DanHeidinga
Copy link
Member Author

I haven't been able to confirm if this fixes petclinic yet but have confirmation that other open module tests are passing. This is at least a positive step forward

@JasonFengJ9
Copy link
Member

The change looks good.

Just noticed that visible.c:checkModuleAccess() can check unnamed | open modules which export all packages, hence skip the call to isPackageExportedToModuleWithName(). I think this can be done in a separated PR though.

@DanHeidinga
Copy link
Member Author

I'd prefer to keep that logic in isPackageExportedToModuleWithName() so that there's only once place to modify it.

@DanHeidinga DanHeidinga requested a review from gacholio May 25, 2018 15:10
@gacholio gacholio self-assigned this May 25, 2018
@gacholio
Copy link
Contributor

jenkins test sanity plinux jdk9

@JasonFengJ9
Copy link
Member

isPackageExportedToModuleWithName invokes isPackageExportedToModuleHelper(currentThread, fromModule, getPackageDefinitionWithName(currentThread, fromModule, packageName, len, errCode), toModule, toUnnamed) in which getPackageDefinitionWithName might not be a cheap call for j9mem_allocate_memory, hashPackageTableAtWithUTF8Name, etc.

Agreed that more thinking is needed to avoid spreading out access checking code.

@gacholio gacholio merged commit cdadab4 into eclipse-openj9:master May 25, 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.

OpenJ9 exception running in JDK 10 with Jigsaw modules
3 participants