RFR: 8195744: Avoid calling ClassLoader.checkPackageAccess if security manager is not installed [v3]

David Holmes dholmes at openjdk.java.net
Fri Feb 5 03:17:44 UTC 2021


On Fri, 5 Feb 2021 02:28:31 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> src/hotspot/share/classfile/systemDictionary.cpp line 503:
>> 
>>> 501:     } else {
>>> 502:      log_debug(protectiondomain)("granted");
>>> 503:     }
>> 
>> Did you intend leaving this in?
>
> Yes, why not? It's very useful in logging.

There's no context for this final bit out of output. It could appear many lines after the earlier logging, and unless there is some locking around all this, could be interleaved with different PD checks. It seems to me that all the logging could occur after the Java call and include the success/failure. It could also include whether the check trivially succeeded due to there being no SM.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2410


More information about the core-libs-dev mailing list