Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
e7c3ac14
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看板
提交
e7c3ac14
编写于
12月 03, 2019
作者:
V
vlivanov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8231430: C2: Memory stomp in max_array_length() for T_ILLEGAL type
Reviewed-by: kvn, thartmann
上级
026f4ea4
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
17 addition
and
19 deletion
+17
-19
src/share/vm/opto/type.cpp
src/share/vm/opto/type.cpp
+11
-18
src/share/vm/opto/type.hpp
src/share/vm/opto/type.hpp
+2
-1
src/share/vm/utilities/globalDefinitions.hpp
src/share/vm/utilities/globalDefinitions.hpp
+4
-0
未找到文件。
src/share/vm/opto/type.cpp
浏览文件 @
e7c3ac14
...
@@ -3753,29 +3753,22 @@ const TypeOopPtr *TypeAryPtr::cast_to_instance_id(int instance_id) const {
...
@@ -3753,29 +3753,22 @@ const TypeOopPtr *TypeAryPtr::cast_to_instance_id(int instance_id) const {
return
make
(
_ptr
,
const_oop
(),
_ary
,
klass
(),
_klass_is_exact
,
_offset
,
instance_id
,
_speculative
,
_inline_depth
);
return
make
(
_ptr
,
const_oop
(),
_ary
,
klass
(),
_klass_is_exact
,
_offset
,
instance_id
,
_speculative
,
_inline_depth
);
}
}
//-----------------------------narrow_size_type-------------------------------
//-----------------------------max_array_length-------------------------------
// Local cache for arrayOopDesc::max_array_length(etype),
// A wrapper around arrayOopDesc::max_array_length(etype) with some input normalization.
// which is kind of slow (and cached elsewhere by other users).
jint
TypeAryPtr
::
max_array_length
(
BasicType
etype
)
{
static
jint
max_array_length_cache
[
T_CONFLICT
+
1
];
if
(
!
is_java_primitive
(
etype
)
&&
!
is_reference_type
(
etype
))
{
static
jint
max_array_length
(
BasicType
etype
)
{
if
(
etype
==
T_NARROWOOP
)
{
jint
&
cache
=
max_array_length_cache
[
etype
];
jint
res
=
cache
;
if
(
res
==
0
)
{
switch
(
etype
)
{
case
T_NARROWOOP
:
etype
=
T_OBJECT
;
etype
=
T_OBJECT
;
break
;
}
else
if
(
etype
==
T_ILLEGAL
)
{
// bottom[]
case
T_NARROWKLASS
:
etype
=
T_BYTE
;
// will produce conservatively high value
case
T_CONFLICT
:
}
else
{
case
T_ILLEGAL
:
fatal
(
err_msg
(
"not an element type: %s"
,
type2name
(
etype
)));
case
T_VOID
:
etype
=
T_BYTE
;
// will produce conservatively high value
}
}
cache
=
res
=
arrayOopDesc
::
max_array_length
(
etype
);
}
}
return
res
;
return
arrayOopDesc
::
max_array_length
(
etype
)
;
}
}
//-----------------------------narrow_size_type-------------------------------
// Narrow the given size type to the index range for the given array base type.
// Narrow the given size type to the index range for the given array base type.
// Return NULL if the resulting int type becomes empty.
// Return NULL if the resulting int type becomes empty.
const
TypeInt
*
TypeAryPtr
::
narrow_size_type
(
const
TypeInt
*
size
)
const
{
const
TypeInt
*
TypeAryPtr
::
narrow_size_type
(
const
TypeInt
*
size
)
const
{
...
...
src/share/vm/opto/type.hpp
浏览文件 @
e7c3ac14
...
@@ -433,7 +433,6 @@ public:
...
@@ -433,7 +433,6 @@ public:
private:
private:
// support arrays
// support arrays
static
const
BasicType
_basic_type
[];
static
const
Type
*
_zero_type
[
T_CONFLICT
+
1
];
static
const
Type
*
_zero_type
[
T_CONFLICT
+
1
];
static
const
Type
*
_const_basic_type
[
T_CONFLICT
+
1
];
static
const
Type
*
_const_basic_type
[
T_CONFLICT
+
1
];
};
};
...
@@ -1154,6 +1153,8 @@ public:
...
@@ -1154,6 +1153,8 @@ public:
const
TypeAryPtr
*
cast_to_stable
(
bool
stable
,
int
stable_dimension
=
1
)
const
;
const
TypeAryPtr
*
cast_to_stable
(
bool
stable
,
int
stable_dimension
=
1
)
const
;
int
stable_dimension
()
const
;
int
stable_dimension
()
const
;
static
jint
max_array_length
(
BasicType
etype
)
;
// Convenience common pre-built types.
// Convenience common pre-built types.
static
const
TypeAryPtr
*
RANGE
;
static
const
TypeAryPtr
*
RANGE
;
static
const
TypeAryPtr
*
OOPS
;
static
const
TypeAryPtr
*
OOPS
;
...
...
src/share/vm/utilities/globalDefinitions.hpp
浏览文件 @
e7c3ac14
...
@@ -644,6 +644,10 @@ inline bool is_signed_subword_type(BasicType t) {
...
@@ -644,6 +644,10 @@ inline bool is_signed_subword_type(BasicType t) {
return
(
t
==
T_BYTE
||
t
==
T_SHORT
);
return
(
t
==
T_BYTE
||
t
==
T_SHORT
);
}
}
inline
bool
is_reference_type
(
BasicType
t
)
{
return
(
t
==
T_OBJECT
||
t
==
T_ARRAY
);
}
// Convert a char from a classfile signature to a BasicType
// Convert a char from a classfile signature to a BasicType
inline
BasicType
char2type
(
char
c
)
{
inline
BasicType
char2type
(
char
c
)
{
switch
(
c
)
{
switch
(
c
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录