RFR: 8156871: Possible concurrency issue with JVM_AddModuleExports
Lois Foltan
lois.foltan at oracle.com
Fri Jun 10 14:25:18 UTC 2016
Hello,
Please review the work to finalize a concurrency issue when setting the
exported state of a PackageEntry. The work completed in bug
https://bugs.openjdk.java.net/browse/JDK-8152404 actually had the side
effect of fixing this bug as well. Prior to JDK-8152404, each
PackageEntry determined its exported state via two flags, one of which
was a general _is_exported flag followed by a another more specific
state of exportability flag that determined if the package was exported
qualifiedly or not to a given module. Checking these two flags, as the
PackageEntry::is_* methods used to do without the Module_lock, was
problematic and yielded a situation where a call to add a module to a
PackageEntry's qualified exported entry list failed because it was
determined that the package was unqualifiedly exported when it really
was not.
To complete this fix, I have removed the is_unqual_exported call prior
to setting a PackageEntry's exported list. The method
PackageEntry::set_exported determines what the current package export
state is and acts correctly. Also, the test case has been added in this
webrev since it is a good stress test case for JVM module support.
Passes JPRT, java/lang, java/util RBT hotspot nightly.
Bug: https://bugs.openjdk.java.net/browse/JDK-8156871
Open webrev: http://cr.openjdk.java.net/~lfoltan/bug_jdk8156871/webrev/
Thanks,
Lois
More information about the hotspot-runtime-dev
mailing list