Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
2b04f898
D
dragonwell8_hotspot
项目概览
openanolis
/
dragonwell8_hotspot
通知
2
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_hotspot
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
2b04f898
编写于
11月 08, 2017
作者:
H
hseigel
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8189123: More consistent classloading
Reviewed-by: acorn, ahgross, rhalade Contributed-by: harold.seigel@oracle.com
上级
4543f523
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
13 addition
and
2 deletion
+13
-2
src/share/vm/classfile/verificationType.cpp
src/share/vm/classfile/verificationType.cpp
+3
-1
src/share/vm/classfile/verifier.cpp
src/share/vm/classfile/verifier.cpp
+3
-1
src/share/vm/prims/jvm.cpp
src/share/vm/prims/jvm.cpp
+7
-0
未找到文件。
src/share/vm/classfile/verificationType.cpp
浏览文件 @
2b04f898
/*
* Copyright (c) 2003, 201
6
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
7
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -63,6 +63,7 @@ bool VerificationType::is_reference_assignable_from(
name
(),
Handle
(
THREAD
,
klass
->
class_loader
()),
Handle
(
THREAD
,
klass
->
protection_domain
()),
true
,
CHECK_false
);
KlassHandle
this_class
(
THREAD
,
obj
);
klass
->
class_loader_data
()
->
record_dependency
(
obj
,
CHECK_false
);
if
(
this_class
->
is_interface
()
&&
(
!
from_field_is_protected
||
from
.
name
()
!=
vmSymbols
::
java_lang_Object
()))
{
...
...
@@ -74,6 +75,7 @@ bool VerificationType::is_reference_assignable_from(
Klass
*
from_class
=
SystemDictionary
::
resolve_or_fail
(
from
.
name
(),
Handle
(
THREAD
,
klass
->
class_loader
()),
Handle
(
THREAD
,
klass
->
protection_domain
()),
true
,
CHECK_false
);
klass
->
class_loader_data
()
->
record_dependency
(
from_class
,
CHECK_false
);
bool
result
=
InstanceKlass
::
cast
(
from_class
)
->
is_subclass_of
(
this_class
());
if
(
result
&&
DumpSharedSpaces
)
{
if
(
klass
()
->
is_subclass_of
(
from_class
)
&&
klass
()
->
is_subclass_of
(
this_class
()))
{
...
...
src/share/vm/classfile/verifier.cpp
浏览文件 @
2b04f898
...
...
@@ -1949,9 +1949,11 @@ Klass* ClassVerifier::load_class(Symbol* name, TRAPS) {
oop
loader
=
current_class
()
->
class_loader
();
oop
protection_domain
=
current_class
()
->
protection_domain
();
return
SystemDictionary
::
resolve_or_fail
(
Klass
*
kls
=
SystemDictionary
::
resolve_or_fail
(
name
,
Handle
(
THREAD
,
loader
),
Handle
(
THREAD
,
protection_domain
),
true
,
CHECK_NULL
);
current_class
()
->
class_loader_data
()
->
record_dependency
(
kls
,
CHECK_NULL
);
return
kls
;
}
bool
ClassVerifier
::
is_protected_access
(
instanceKlassHandle
this_class
,
...
...
src/share/vm/prims/jvm.cpp
浏览文件 @
2b04f898
...
...
@@ -24,6 +24,7 @@
#include "precompiled.hpp"
#include "classfile/classLoader.hpp"
#include "classfile/classLoaderData.inline.hpp"
#include "classfile/classLoaderExt.hpp"
#include "classfile/javaAssertions.hpp"
#include "classfile/javaClasses.hpp"
...
...
@@ -952,6 +953,12 @@ JVM_ENTRY(jclass, JVM_FindClassFromClass(JNIEnv *env, const char *name,
Handle
h_prot
(
THREAD
,
protection_domain
);
jclass
result
=
find_class_from_class_loader
(
env
,
h_name
,
init
,
h_loader
,
h_prot
,
true
,
thread
);
if
(
result
!=
NULL
)
{
oop
mirror
=
JNIHandles
::
resolve_non_null
(
result
);
Klass
*
to_class
=
java_lang_Class
::
as_Klass
(
mirror
);
ClassLoaderData
*
cld
=
ClassLoaderData
::
class_loader_data
(
h_loader
());
cld
->
record_dependency
(
to_class
,
CHECK_NULL
);
}
if
(
TraceClassResolution
&&
result
!=
NULL
)
{
// this function is generally only used for class loading during verification.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录