Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
33d974d4
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看板
提交
33d974d4
编写于
3月 02, 2011
作者:
Z
zgu
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
0100121e
0898592e
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
114 addition
and
2 deletion
+114
-2
src/share/vm/memory/allocation.cpp
src/share/vm/memory/allocation.cpp
+7
-2
src/share/vm/memory/allocation.hpp
src/share/vm/memory/allocation.hpp
+12
-0
src/share/vm/utilities/globalDefinitions_gcc.hpp
src/share/vm/utilities/globalDefinitions_gcc.hpp
+1
-0
src/share/vm/utilities/globalDefinitions_sparcWorks.hpp
src/share/vm/utilities/globalDefinitions_sparcWorks.hpp
+11
-0
src/share/vm/utilities/globalDefinitions_visCPP.hpp
src/share/vm/utilities/globalDefinitions_visCPP.hpp
+9
-0
test/runtime/6878713/Test6878713.sh
test/runtime/6878713/Test6878713.sh
+74
-0
test/runtime/6878713/testcase.jar
test/runtime/6878713/testcase.jar
+0
-0
未找到文件。
src/share/vm/memory/allocation.cpp
浏览文件 @
33d974d4
...
...
@@ -422,6 +422,9 @@ size_t Arena::used() const {
return
sum
;
// Return total consumed space.
}
void
Arena
::
signal_out_of_memory
(
size_t
sz
,
const
char
*
whence
)
const
{
vm_exit_out_of_memory
(
sz
,
whence
);
}
// Grow a new Chunk
void
*
Arena
::
grow
(
size_t
x
)
{
...
...
@@ -431,8 +434,9 @@ void* Arena::grow( size_t x ) {
Chunk
*
k
=
_chunk
;
// Get filled-up chunk address
_chunk
=
new
(
len
)
Chunk
(
len
);
if
(
_chunk
==
NULL
)
vm_exit_out_of_memory
(
len
*
Chunk
::
aligned_overhead_size
(),
"Arena::grow"
);
if
(
_chunk
==
NULL
)
{
signal_out_of_memory
(
len
*
Chunk
::
aligned_overhead_size
(),
"Arena::grow"
);
}
if
(
k
)
k
->
set_next
(
_chunk
);
// Append new chunk to end of linked list
else
_first
=
_chunk
;
...
...
@@ -529,6 +533,7 @@ void* Arena::malloc(size_t size) {
// for debugging with UseMallocOnly
void
*
Arena
::
internal_malloc_4
(
size_t
x
)
{
assert
(
(
x
&
(
sizeof
(
char
*
)
-
1
))
==
0
,
"misaligned size"
);
check_for_overflow
(
x
,
"Arena::internal_malloc_4"
);
if
(
_hwm
+
x
>
_max
)
{
return
grow
(
x
);
}
else
{
...
...
src/share/vm/memory/allocation.hpp
浏览文件 @
33d974d4
...
...
@@ -207,6 +207,15 @@ protected:
debug_only
(
void
*
malloc
(
size_t
size
);)
debug_only
(
void
*
internal_malloc_4
(
size_t
x
);)
NOT_PRODUCT
(
void
inc_bytes_allocated
(
size_t
x
);)
void
signal_out_of_memory
(
size_t
request
,
const
char
*
whence
)
const
;
void
check_for_overflow
(
size_t
request
,
const
char
*
whence
)
const
{
if
(
UINTPTR_MAX
-
request
<
(
uintptr_t
)
_hwm
)
{
signal_out_of_memory
(
request
,
whence
);
}
}
public:
Arena
();
Arena
(
size_t
init_size
);
...
...
@@ -220,6 +229,7 @@ protected:
assert
(
is_power_of_2
(
ARENA_AMALLOC_ALIGNMENT
)
,
"should be a power of 2"
);
x
=
ARENA_ALIGN
(
x
);
debug_only
(
if
(
UseMallocOnly
)
return
malloc
(
x
);)
check_for_overflow
(
x
,
"Arena::Amalloc"
);
NOT_PRODUCT
(
inc_bytes_allocated
(
x
);)
if
(
_hwm
+
x
>
_max
)
{
return
grow
(
x
);
...
...
@@ -233,6 +243,7 @@ protected:
void
*
Amalloc_4
(
size_t
x
)
{
assert
(
(
x
&
(
sizeof
(
char
*
)
-
1
))
==
0
,
"misaligned size"
);
debug_only
(
if
(
UseMallocOnly
)
return
malloc
(
x
);)
check_for_overflow
(
x
,
"Arena::Amalloc_4"
);
NOT_PRODUCT
(
inc_bytes_allocated
(
x
);)
if
(
_hwm
+
x
>
_max
)
{
return
grow
(
x
);
...
...
@@ -253,6 +264,7 @@ protected:
size_t
delta
=
(((
size_t
)
_hwm
+
DALIGN_M1
)
&
~
DALIGN_M1
)
-
(
size_t
)
_hwm
;
x
+=
delta
;
#endif
check_for_overflow
(
x
,
"Arena::Amalloc_D"
);
NOT_PRODUCT
(
inc_bytes_allocated
(
x
);)
if
(
_hwm
+
x
>
_max
)
{
return
grow
(
x
);
// grow() returns a result aligned >= 8 bytes.
...
...
src/share/vm/utilities/globalDefinitions_gcc.hpp
浏览文件 @
33d974d4
...
...
@@ -77,6 +77,7 @@
# endif
#ifdef LINUX
#define __STDC_LIMIT_MACROS
#include <inttypes.h>
#include <signal.h>
#include <ucontext.h>
...
...
src/share/vm/utilities/globalDefinitions_sparcWorks.hpp
浏览文件 @
33d974d4
...
...
@@ -148,6 +148,17 @@ typedef unsigned int uintptr_t;
#endif
#endif
// On solaris 8, UINTPTR_MAX is defined as empty.
// Everywhere else it's an actual value.
#if UINTPTR_MAX - 1 == -1
#undef UINTPTR_MAX
#ifdef _LP64
#define UINTPTR_MAX UINT64_MAX
#else
#define UINTPTR_MAX UINT32_MAX
#endif
/* ifdef _LP64 */
#endif
// Additional Java basic types
typedef
unsigned
char
jubyte
;
...
...
src/share/vm/utilities/globalDefinitions_visCPP.hpp
浏览文件 @
33d974d4
...
...
@@ -41,6 +41,7 @@
# include <stdio.h> // for va_list
# include <time.h>
# include <fcntl.h>
# include <limits.h>
// Need this on windows to get the math constants (e.g., M_PI).
#define _USE_MATH_DEFINES
# include <math.h>
...
...
@@ -99,6 +100,14 @@ typedef signed int intptr_t;
typedef
signed
int
ssize_t
;
#endif
#ifndef UINTPTR_MAX
#ifdef _WIN64
#define UINTPTR_MAX _UI64_MAX
#else
#define UINTPTR_MAX _UI32_MAX
#endif
#endif
//----------------------------------------------------------------------------------------------------
// Additional Java basic types
...
...
test/runtime/6878713/Test6878713.sh
0 → 100644
浏览文件 @
33d974d4
#!/bin/sh
##
## @test
## @bug 6878713
## @summary Verifier heap corruption, relating to backward jsrs
## @run shell/timeout=120 Test6878713.sh
##
if
[
"
${
TESTSRC
}
"
=
""
]
then
TESTSRC
=
.
fi
if
[
"
${
TESTJAVA
}
"
=
""
]
then
PARENT
=
`
dirname
\`
which java
\`
`
TESTJAVA
=
`
dirname
${
PARENT
}
`
echo
"TESTJAVA not set, selecting "
${
TESTJAVA
}
echo
"If this is incorrect, try setting the variable manually."
fi
if
[
"
${
TESTCLASSES
}
"
=
""
]
then
echo
"TESTCLASSES not set. Test cannot execute. Failed."
exit
1
fi
BIT_FLAG
=
""
# set platform-dependent variables
OS
=
`
uname
-s
`
case
"
$OS
"
in
SunOS
|
Linux
)
NULL
=
/dev/null
PS
=
":"
FS
=
"/"
## for solaris, linux it's HOME
FILE_LOCATION
=
$HOME
if
[
-f
${
FILE_LOCATION
}${
FS
}
JDK64BIT
-a
${
OS
}
=
"SunOS"
]
then
BIT_FLAG
=
`
cat
${
FILE_LOCATION
}${
FS
}
JDK64BIT |
grep
-v
'^#'
`
fi
;;
Windows_
*
)
NULL
=
NUL
PS
=
";"
FS
=
"
\\
"
;;
*
)
echo
"Unrecognized system!"
exit
1
;
;;
esac
JEMMYPATH
=
${
CPAPPEND
}
CLASSPATH
=
.
${
PS
}${
TESTCLASSES
}${
PS
}${
JEMMYPATH
}
;
export
CLASSPATH
THIS_DIR
=
`
pwd
`
${
TESTJAVA
}${
FS
}
bin
${
FS
}
java
${
BIT_FLAG
}
-version
${
TESTJAVA
}${
FS
}
bin
${
FS
}
jar xvf
${
TESTSRC
}${
FS
}
testcase.jar
${
TESTJAVA
}${
FS
}
bin
${
FS
}
java
${
BIT_FLAG
}
OOMCrashClass1960_2
>
test.out 2>&1
if
[
-s
core
-o
-s
"hs_*.log"
]
then
cat
hs
*
.log
echo
"Test Failed"
exit
1
else
echo
"Test Passed"
exit
0
fi
test/runtime/6878713/testcase.jar
0 → 100644
浏览文件 @
33d974d4
文件已添加
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录