Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
f72a8b94
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f72a8b94
编写于
6月 29, 2016
作者:
C
coleenp
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8159515: Improve indy validation
Reviewed-by: jrose, hseigel, vlivanov, bmoloden, ctornqvi, mschoene
上级
83b13f1d
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
8 addition
and
23 deletion
+8
-23
src/share/native/common/check_code.c
src/share/native/common/check_code.c
+8
-23
未找到文件。
src/share/native/common/check_code.c
浏览文件 @
f72a8b94
...
...
@@ -1286,14 +1286,13 @@ verify_opcode_operands(context_type *context, unsigned int inumber, int offset)
case
JVM_OPC_invokevirtual
:
case
JVM_OPC_invokespecial
:
case
JVM_OPC_invokestatic
:
case
JVM_OPC_invokedynamic
:
case
JVM_OPC_invokeinterface
:
{
/* Make sure the constant pool item is the right type. */
int
key
=
(
code
[
offset
+
1
]
<<
8
)
+
code
[
offset
+
2
];
const
char
*
methodname
;
jclass
cb
=
context
->
class
;
fullinfo_type
clazz_info
;
int
is_constructor
,
is_internal
,
is_invokedynamic
;
int
is_constructor
,
is_internal
;
int
kind
;
switch
(
opcode
)
{
...
...
@@ -1302,9 +1301,6 @@ verify_opcode_operands(context_type *context, unsigned int inumber, int offset)
?
(
1
<<
JVM_CONSTANT_Methodref
)
:
((
1
<<
JVM_CONSTANT_InterfaceMethodref
)
|
(
1
<<
JVM_CONSTANT_Methodref
)));
break
;
case
JVM_OPC_invokedynamic
:
kind
=
1
<<
JVM_CONSTANT_NameAndType
;
break
;
case
JVM_OPC_invokeinterface
:
kind
=
1
<<
JVM_CONSTANT_InterfaceMethodref
;
break
;
...
...
@@ -1312,7 +1308,6 @@ verify_opcode_operands(context_type *context, unsigned int inumber, int offset)
kind
=
1
<<
JVM_CONSTANT_Methodref
;
}
is_invokedynamic
=
opcode
==
JVM_OPC_invokedynamic
;
/* Make sure the constant pool item is the right type. */
verify_constant_pool_type
(
context
,
key
,
kind
);
methodname
=
JVM_GetCPMethodNameUTF
(
env
,
cb
,
key
);
...
...
@@ -1321,11 +1316,8 @@ verify_opcode_operands(context_type *context, unsigned int inumber, int offset)
is_internal
=
methodname
[
0
]
==
'<'
;
pop_and_free
(
context
);
if
(
is_invokedynamic
)
clazz_info
=
context
->
object_info
;
// anything will do
else
clazz_info
=
cp_index_to_class_fullinfo
(
context
,
key
,
JVM_CONSTANT_Methodref
);
clazz_info
=
cp_index_to_class_fullinfo
(
context
,
key
,
JVM_CONSTANT_Methodref
);
this_idata
->
operand
.
i
=
key
;
this_idata
->
operand2
.
fi
=
clazz_info
;
if
(
is_constructor
)
{
...
...
@@ -1380,17 +1372,15 @@ verify_opcode_operands(context_type *context, unsigned int inumber, int offset)
"Fourth operand byte of invokeinterface must be zero"
);
}
pop_and_free
(
context
);
}
else
if
(
opcode
==
JVM_OPC_invokedynamic
)
{
if
(
code
[
offset
+
3
]
!=
0
||
code
[
offset
+
4
]
!=
0
)
{
CCerror
(
context
,
"Third and fourth operand bytes of invokedynamic must be zero"
);
}
}
else
if
(
opcode
==
JVM_OPC_invokevirtual
||
opcode
==
JVM_OPC_invokespecial
)
set_protected
(
context
,
inumber
,
key
,
opcode
);
break
;
}
case
JVM_OPC_invokedynamic
:
CCerror
(
context
,
"invokedynamic bytecode is not supported in this class file version"
);
case
JVM_OPC_instanceof
:
case
JVM_OPC_checkcast
:
...
...
@@ -2071,7 +2061,6 @@ pop_stack(context_type *context, unsigned int inumber, stack_info_type *new_stac
case
JVM_OPC_invokevirtual
:
case
JVM_OPC_invokespecial
:
case
JVM_OPC_invokeinit
:
/* invokespecial call to <init> */
case
JVM_OPC_invokedynamic
:
case
JVM_OPC_invokestatic
:
case
JVM_OPC_invokeinterface
:
{
/* The top stuff on the stack depends on the method signature */
int
operand
=
this_idata
->
operand
.
i
;
...
...
@@ -2087,8 +2076,7 @@ pop_stack(context_type *context, unsigned int inumber, stack_info_type *new_stac
print_formatted_methodname
(
context
,
operand
);
}
#endif
if
(
opcode
!=
JVM_OPC_invokestatic
&&
opcode
!=
JVM_OPC_invokedynamic
)
if
(
opcode
!=
JVM_OPC_invokestatic
)
/* First, push the object */
*
ip
++
=
(
opcode
==
JVM_OPC_invokeinit
?
'@'
:
'A'
);
for
(
p
=
signature
+
1
;
*
p
!=
JVM_SIGNATURE_ENDFUNC
;
)
{
...
...
@@ -2373,7 +2361,6 @@ pop_stack(context_type *context, unsigned int inumber, stack_info_type *new_stac
case
JVM_OPC_invokevirtual
:
case
JVM_OPC_invokespecial
:
case
JVM_OPC_invokeinit
:
case
JVM_OPC_invokedynamic
:
case
JVM_OPC_invokeinterface
:
case
JVM_OPC_invokestatic
:
{
int
operand
=
this_idata
->
operand
.
i
;
const
char
*
signature
=
...
...
@@ -2383,8 +2370,7 @@ pop_stack(context_type *context, unsigned int inumber, stack_info_type *new_stac
int
item
;
const
char
*
p
;
check_and_push
(
context
,
signature
,
VM_STRING_UTF
);
if
(
opcode
==
JVM_OPC_invokestatic
||
opcode
==
JVM_OPC_invokedynamic
)
{
if
(
opcode
==
JVM_OPC_invokestatic
)
{
item
=
0
;
}
else
if
(
opcode
==
JVM_OPC_invokeinit
)
{
fullinfo_type
init_type
=
this_idata
->
operand2
.
fi
;
...
...
@@ -2781,7 +2767,6 @@ push_stack(context_type *context, unsigned int inumber, stack_info_type *new_sta
case
JVM_OPC_invokevirtual
:
case
JVM_OPC_invokespecial
:
case
JVM_OPC_invokeinit
:
case
JVM_OPC_invokedynamic
:
case
JVM_OPC_invokestatic
:
case
JVM_OPC_invokeinterface
:
{
/* Look to signature to determine correct result. */
int
operand
=
this_idata
->
operand
.
i
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录