[8u40] Review request 8064667: Provide support to help identify use of endorsed standards and extension mechanism
Mandy Chung
mandy.chung at oracle.com
Tue Nov 18 22:55:41 UTC 2014
On 11/18/14 2:33 PM, Coleen Phillimore wrote:
> Mandy,
>
> In arguments.cpp, I think this should be snprintf in case java_home is
> MAXPATHLEN long.
>
That's what I was wondering as I copied from the existing code in
arguments.cpp.
> + char endorsedDir[JVM_MAXPATHLEN];
> + char extDir[JVM_MAXPATHLEN];
> + const char* fileSep = os::file_separator();
> + sprintf(endorsedDir, "%s%slib%sendorsed",
> Arguments::get_java_home(), fileSep, fileSep);
> + sprintf(extDir, "%s%slib%sext", Arguments::get_java_home(),
> fileSep, fileSep);
> +
I will fix them to use snprintf. I assume there is a bug to fix the
existing use of sprintf; if not you may want to file one.
>
> This list could be hard to maintain. I have no alternatives to
> suggest though.
I expect this list will rarely be changed for 8 update.
>
> + // List of JAR files installed in the default lib/ext directory.
> + // -XX:+CheckEndorsedAndExtDirs checks if any non-JDK file installed
>
> The code looks correct though but a bit painful searching through
> directories. At least it's optional.
It's off by default. This is to help users using 8u40 to prepare for
migration and scanning the directories should not be an issue.
thanks for the review.
Mandy
>
> Coleen
>
> On 11/17/14, 9:02 PM, Mandy Chung wrote:
>> Updated webrev:
>> http://cr.openjdk.java.net/~mchung/jdk8u/webrevs/8064667/webrev.01/
>>
>> This addresses Calvin's comment. It now keeps a list of the jar
>> files shipped with jre/lib/ext and determine if jre/lib/ext has any
>> other non-JDK jar files installed.
>>
>> Mandy
>>
>> On 11/17/2014 8:57 AM, Mandy Chung wrote:
>>> This requests both code review and 8u40 approval for:
>>> https://bugs.openjdk.java.net/browse/JDK-8064667
>>>
>>> Webrev:
>>> http://cr.openjdk.java.net/~mchung/jdk8u/webrevs/8064667/webrev.00/
>>>
>>> JEP 220 [1] proposes to remove the endorsed standards override
>>> mechanism and extension mechanism. This patch adds a VM flag in 8u40
>>> to help identify any existing uses of these mechanisms so that users
>>> can turn on the VM flag to help identify if they depend on the
>>> endorsed standards override mechanism and extension mechanism and
>>> can plan to prepare for the migration to a newer JDK release early
>>> on. When -XX:+CheckEndorsedAndExtDirs is set, the VM will exit if
>>> the system property -Djava.endorsed.dirs or -Djava.ext.dirs is set,
>>> or if ${java.home}/lib/endorsed or ${java.home}/lib/ext exists, or
>>> any system extension directory contains JAR files.
>>>
>>> Thanks
>>> Mandy
>>> [1] http://openjdk.java.net/jeps/220
>>>
>>>
>>>
>>
>
More information about the hotspot-runtime-dev
mailing list