Integrated: 8195744: Avoid calling ClassLoader.checkPackageAccess if security manager is not installed

Coleen Phillimore coleenp at openjdk.java.net
Mon Feb 8 21:33:56 UTC 2021


On Thu, 4 Feb 2021 19:12:32 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

> This change does not call up to Java for checkPackageAccess if the security manager is NULL, but still saves the protection domain in the pd_set for that dictionary entry.  If the option -Djava.security.manager=disallow is set, that means that there will never be a security manager and the JVM code can avoid saving the protection domains completely. 
> See the two functions java_lang_System::has_security_manager() and java_lang_System::allow_security_manager() for details.
> Also deleted ProtectionDomainVerification because there's no use for this option.
> 
> Tested with tier1 hotspot, jdk and langtools.
> and tier2-6.

This pull request has now been integrated.

Changeset: ace8f946
Author:    Coleen Phillimore <coleenp at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/ace8f946
Stats:     175 lines in 8 files changed: 94 ins; 45 del; 36 mod

8195744: Avoid calling ClassLoader.checkPackageAccess if security manager is not installed

Reviewed-by: dholmes, iklam

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

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


More information about the hotspot-runtime-dev mailing list