RFR (M): JDK-8159262: Walking PackageEntry Export and ModuleEntry Reads Must Occur Only When Neccessary And Wait Until ClassLoader's Aliveness Determined

David Holmes david.holmes at oracle.com
Wed Jun 22 00:51:39 UTC 2016


Hi Lois,

Initial question: what is the platform classloader versus the 
application classloader?

Thanks,
David

On 22/06/2016 3:59 AM, Lois Foltan wrote:
> Hello,
>
> Please review the following fix:
>
> Webrev:
>     http://cr.openjdk.java.net/~lfoltan/bug_jdk8159262/webrev/
>
> Bug: Walking PackageEntry Export and ModuleEntry Reads Must Occur Only
> When Neccessary And Wait Until ClassLoader's Aliveness Determined
>     https://bugs.openjdk.java.net/browse/JDK-8159262
>
> Summary:
> In ClassLoaderDataGraph::do_unloading(), the decision to walk each
> ClassLoader's PackageEntry exports and ModuleEntry's reads list was
> occurring too soon, before the aliveness of all class loaders was
> determined.  The walk has been moved to immediately after and only alive
> ClassLoader's PackageEntry and ModuleEntry lists are walked.
>
> The other piece to this fix is that the lists themselves were being
> unnecessarily walked if only modules on any given list were either:
>     1. defined to the same class loader as either the package being
> exported or the module that a read edge was being
>         established from.  Thus both modules in this equation have the
> same life cycle.
>     2. or defined to one of the three builtin class loaders (boot,
> application or platform) which never die
>
> Test:
> - java/io, java/lang/, java/util, all Hotspot jtreg tests, JCK vm & lang
> - full hotspot nightly RBT run in progress


More information about the hotspot-dev mailing list