RFR(M) 8209385: CDS runtime classpath checking is too strict when only classes from the system modules are archived

Jiangli Zhou jiangli.zhou at oracle.com
Fri Aug 17 21:14:03 UTC 2018


Looks good! Thanks for fixing this issue.

Jiangli


On 8/17/18 2:06 PM, Calvin Cheung wrote:
> bug: https://bugs.openjdk.java.net/browse/JDK-8209385
>
> webrev: http://cr.openjdk.java.net/~ccheung/8209385/webrev.00/
>
> If a path such as -cp points to an non-empty directory is specified 
> during CDS dump time but is not being referenced for class loading, we 
> should not exit with the error "Cannot have non-empty directory in 
> paths".
>
> The fix is to skip checking the path entries which are not being 
> referenced during CDS dump time. Adding the _max_used_path_index field 
> in ClassLoaderExt so that the unreferenced path entries won't be 
> checked during dump time. The _max_used_path_index will also be stored 
> in the CDS archive header so that during run time, the unreferenced 
> path entries will not be checked.
>
> Testing: hs-tier 1,2,3.
>
> thanks,
> Calvin



More information about the hotspot-runtime-dev mailing list