Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
b81172e8
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看板
提交
b81172e8
编写于
4月 08, 2016
作者:
V
vkempik
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8152479: Coded byte streams
Reviewed-by: hseigel
上级
5418c529
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
28 addition
and
21 deletion
+28
-21
src/share/vm/interpreter/bytecodeStream.cpp
src/share/vm/interpreter/bytecodeStream.cpp
+5
-5
src/share/vm/interpreter/bytecodeStream.hpp
src/share/vm/interpreter/bytecodeStream.hpp
+23
-16
未找到文件。
src/share/vm/interpreter/bytecodeStream.cpp
浏览文件 @
b81172e8
/*
* Copyright (c) 1997, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
6
, 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
...
...
@@ -31,12 +31,12 @@ Bytecodes::Code RawBytecodeStream::raw_next_special(Bytecodes::Code code) {
// set next bytecode position
address
bcp
=
RawBytecodeStream
::
bcp
();
address
end
=
method
()
->
code_base
()
+
end_bci
();
int
l
=
Bytecodes
::
raw_special_length_at
(
bcp
,
end
);
if
(
l
<=
0
||
(
_bci
+
l
)
>
_end_bci
)
{
int
len
=
Bytecodes
::
raw_special_length_at
(
bcp
,
end
);
// Very large tableswitch or lookupswitch size can cause _next_bci to overflow.
if
(
len
<=
0
||
(
_bci
>
_end_bci
-
len
)
||
(
_bci
-
len
>=
_next_bci
))
{
code
=
Bytecodes
::
_illegal
;
}
else
{
_next_bci
+=
l
;
assert
(
_bci
<
_next_bci
,
"length must be > 0"
);
_next_bci
+=
len
;
// set attributes
_is_wide
=
false
;
// check for special (uncommon) cases
...
...
src/share/vm/interpreter/bytecodeStream.hpp
浏览文件 @
b81172e8
/*
* Copyright (c) 1997, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
6
, 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
...
...
@@ -149,12 +149,15 @@ class RawBytecodeStream: public BaseBytecodeStream {
code
=
Bytecodes
::
code_or_bp_at
(
bcp
);
// set next bytecode position
int
l
=
Bytecodes
::
length_for
(
code
);
if
(
l
>
0
&&
(
_bci
+
l
)
<=
_end_bci
)
{
int
l
en
=
Bytecodes
::
length_for
(
code
);
if
(
l
en
>
0
&&
(
_bci
<=
_end_bci
-
len
)
)
{
assert
(
code
!=
Bytecodes
::
_wide
&&
code
!=
Bytecodes
::
_tableswitch
&&
code
!=
Bytecodes
::
_lookupswitch
,
"can't be special bytecode"
);
_is_wide
=
false
;
_next_bci
+=
l
;
_next_bci
+=
len
;
if
(
_next_bci
<=
_bci
)
{
// Check for integer overflow
code
=
Bytecodes
::
_illegal
;
}
_raw_code
=
code
;
return
code
;
}
else
{
...
...
@@ -203,19 +206,23 @@ class BytecodeStream: public BaseBytecodeStream {
// note that we cannot advance before having the
// tty bytecode otherwise the stepping is wrong!
// (carefull: length_for(...) must be used first!)
int
l
=
Bytecodes
::
length_for
(
code
);
if
(
l
==
0
)
l
=
Bytecodes
::
length_at
(
_method
(),
bcp
);
_next_bci
+=
l
;
assert
(
_bci
<
_next_bci
,
"length must be > 0"
);
// set attributes
_is_wide
=
false
;
// check for special (uncommon) cases
if
(
code
==
Bytecodes
::
_wide
)
{
raw_code
=
(
Bytecodes
::
Code
)
bcp
[
1
];
code
=
raw_code
;
// wide BCs are always Java-normal
_is_wide
=
true
;
int
len
=
Bytecodes
::
length_for
(
code
);
if
(
len
==
0
)
len
=
Bytecodes
::
length_at
(
_method
(),
bcp
);
if
(
len
<=
0
||
(
_bci
>
_end_bci
-
len
)
||
(
_bci
-
len
>=
_next_bci
))
{
raw_code
=
code
=
Bytecodes
::
_illegal
;
}
else
{
_next_bci
+=
len
;
assert
(
_bci
<
_next_bci
,
"length must be > 0"
);
// set attributes
_is_wide
=
false
;
// check for special (uncommon) cases
if
(
code
==
Bytecodes
::
_wide
)
{
raw_code
=
(
Bytecodes
::
Code
)
bcp
[
1
];
code
=
raw_code
;
// wide BCs are always Java-normal
_is_wide
=
true
;
}
assert
(
Bytecodes
::
is_java_code
(
code
),
"sanity check"
);
}
assert
(
Bytecodes
::
is_java_code
(
code
),
"sanity check"
);
}
_raw_code
=
raw_code
;
_code
=
code
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录