Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
76524d6b
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看板
提交
76524d6b
编写于
8月 28, 2013
作者:
A
acorn
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8020489: VM crash when non-existent interface called by invokespecial
Reviewed-by: kamg, coleenp
上级
4477e479
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
32 addition
and
28 deletion
+32
-28
src/share/vm/classfile/defaultMethods.cpp
src/share/vm/classfile/defaultMethods.cpp
+32
-28
未找到文件。
src/share/vm/classfile/defaultMethods.cpp
浏览文件 @
76524d6b
...
...
@@ -870,7 +870,6 @@ class ErasedShadowChecker : public ShadowChecker {
:
ShadowChecker
(
thread
,
name
,
holder
,
target
)
{}
};
// Find the unique qualified candidate from the perspective of the super_class
// which is the resolved_klass, which must be an immediate superinterface
// of klass
...
...
@@ -884,43 +883,48 @@ Method* find_erased_super_default(InstanceKlass* current_class, InstanceKlass* s
if
(
family
!=
NULL
)
{
family
->
determine_target
(
current_class
,
CHECK_NULL
);
// get target from current_class
}
if
(
family
->
has_target
())
{
Method
*
target
=
family
->
get_selected_target
();
InstanceKlass
*
holder
=
InstanceKlass
::
cast
(
target
->
method_holder
());
if
(
family
->
has_target
())
{
Method
*
target
=
family
->
get_selected_target
();
InstanceKlass
*
holder
=
InstanceKlass
::
cast
(
target
->
method_holder
());
// Verify that the identified method is valid from the context of
// the current class, which is the caller class for invokespecial
// link resolution, i.e. ensure there it is not shadowed.
// You can use invokespecial to disambiguate interface methods, but
// you can not use it to skip over an interface method that would shadow it.
ErasedShadowChecker
checker
(
THREAD
,
target
->
name
(),
holder
,
super_class
);
checker
.
run
(
current_class
);
// Verify that the identified method is valid from the context of
// the current class, which is the caller class for invokespecial
// link resolution, i.e. ensure there it is not shadowed.
// You can use invokespecial to disambiguate interface methods, but
// you can not use it to skip over an interface method that would shadow it.
ErasedShadowChecker
checker
(
THREAD
,
target
->
name
(),
holder
,
super_class
);
checker
.
run
(
current_class
);
if
(
checker
.
found_shadow
())
{
if
(
checker
.
found_shadow
())
{
#ifndef PRODUCT
if
(
TraceDefaultMethods
)
{
tty
->
print_cr
(
" Only candidate found was shadowed."
);
}
if
(
TraceDefaultMethods
)
{
tty
->
print_cr
(
" Only candidate found was shadowed."
);
}
#endif // ndef PRODUCT
THROW_MSG_
(
vmSymbols
::
java_lang_AbstractMethodError
(),
"Accessible default method not found"
,
NULL
);
}
else
{
THROW_MSG_
(
vmSymbols
::
java_lang_AbstractMethodError
(),
"Accessible default method not found"
,
NULL
);
}
else
{
#ifndef PRODUCT
if
(
TraceDefaultMethods
)
{
family
->
print_sig_on
(
tty
,
target
->
signature
(),
1
);
}
if
(
TraceDefaultMethods
)
{
family
->
print_sig_on
(
tty
,
target
->
signature
(),
1
);
}
#endif // ndef PRODUCT
return
target
;
}
return
target
;
}
}
else
{
assert
(
family
->
throws_exception
(),
"must have target or throw"
);
THROW_MSG_
(
vmSymbols
::
java_lang_AbstractMethodError
(),
family
->
get_exception_message
()
->
as_C_string
(),
NULL
);
}
}
else
{
assert
(
family
->
throws_exception
(),
"must have target or throw"
);
THROW_MSG_
(
vmSymbols
::
java_lang_AbstractMethodError
(),
family
->
get_exception_message
()
->
as_C_string
(),
NULL
);
// no method found
ResourceMark
rm
(
THREAD
);
THROW_MSG_
(
vmSymbols
::
java_lang_NoSuchMethodError
(),
Method
::
name_and_sig_as_C_string
(
current_class
,
method_name
,
sig
),
NULL
);
}
}
// This is called during linktime when we find an invokespecial call that
// refers to a direct superinterface. It indicates that we should find the
// default method in the hierarchy of that superinterface, and if that method
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录