Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell11
提交
532491e6
D
dragonwell11
项目概览
openanolis
/
dragonwell11
通知
7
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell11
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
532491e6
编写于
7月 05, 2017
作者:
D
duke
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
ff8a8d35
1a6601e6
变更
12
显示空白变更内容
内联
并排
Showing
12 changed file
with
267 addition
and
17 deletion
+267
-17
.hgtags-top-repo
.hgtags-top-repo
+1
-0
hotspot/.hgtags
hotspot/.hgtags
+1
-0
hotspot/src/share/vm/ci/ciField.cpp
hotspot/src/share/vm/ci/ciField.cpp
+30
-7
hotspot/src/share/vm/ci/ciField.hpp
hotspot/src/share/vm/ci/ciField.hpp
+3
-2
hotspot/src/share/vm/classfile/verifier.cpp
hotspot/src/share/vm/classfile/verifier.cpp
+3
-3
hotspot/src/share/vm/compiler/compilerOracle.cpp
hotspot/src/share/vm/compiler/compilerOracle.cpp
+14
-2
hotspot/src/share/vm/compiler/compilerOracle.hpp
hotspot/src/share/vm/compiler/compilerOracle.hpp
+5
-1
hotspot/src/share/vm/opto/runtime.cpp
hotspot/src/share/vm/opto/runtime.cpp
+2
-1
hotspot/src/share/vm/runtime/arguments.cpp
hotspot/src/share/vm/runtime/arguments.cpp
+2
-0
hotspot/test/runtime/7110720/Test7110720.sh
hotspot/test/runtime/7110720/Test7110720.sh
+122
-0
hotspot/test/runtime/7160757/Test7160757.java
hotspot/test/runtime/7160757/Test7160757.java
+82
-0
test/Makefile
test/Makefile
+2
-1
未找到文件。
.hgtags-top-repo
浏览文件 @
532491e6
...
@@ -165,3 +165,4 @@ a2b2d435f1d275fa8010774c653197c64e326d3a jdk8-b40
...
@@ -165,3 +165,4 @@ a2b2d435f1d275fa8010774c653197c64e326d3a jdk8-b40
1a8c7c530f8a9b7f5bdb9b0693b2f5435ca5205e jdk8-b41
1a8c7c530f8a9b7f5bdb9b0693b2f5435ca5205e jdk8-b41
1ce5dc16416611c58b7480ca67a2eee5153498a6 jdk8-b42
1ce5dc16416611c58b7480ca67a2eee5153498a6 jdk8-b42
661c9aae602bbd9766d12590800c90f1edd1d8dd jdk8-b43
661c9aae602bbd9766d12590800c90f1edd1d8dd jdk8-b43
e4f81a817447c3a4f6868f083c81c2fb1b15d44c jdk8-b44
hotspot/.hgtags
浏览文件 @
532491e6
...
@@ -255,3 +255,4 @@ bd568544be7fcd12a9327e6c448592198d57b043 hs24-b13
...
@@ -255,3 +255,4 @@ bd568544be7fcd12a9327e6c448592198d57b043 hs24-b13
55954061c6e8750ea39a63523fd65d580db6eeb1 jdk8-b42
55954061c6e8750ea39a63523fd65d580db6eeb1 jdk8-b42
e77b8e0ed1f84e3e268239e276c7ab64fa573baa jdk8-b43
e77b8e0ed1f84e3e268239e276c7ab64fa573baa jdk8-b43
5ba29a1db46ecb80a321ca873adb56a3fe6ad320 hs24-b14
5ba29a1db46ecb80a321ca873adb56a3fe6ad320 hs24-b14
831e5c76a20af18f3c08c5a95ed31be0e128a010 jdk8-b44
hotspot/src/share/vm/ci/ciField.cpp
浏览文件 @
532491e6
/*
/*
* Copyright (c) 1999, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 201
2
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
// ------------------------------------------------------------------
// ------------------------------------------------------------------
// ciField::ciField
// ciField::ciField
ciField
::
ciField
(
ciInstanceKlass
*
klass
,
int
index
)
:
_known_to_link_with
(
NULL
)
{
ciField
::
ciField
(
ciInstanceKlass
*
klass
,
int
index
)
:
_known_to_link_with
_put
(
NULL
),
_known_to_link_with_get
(
NULL
)
{
ASSERT_IN_VM
;
ASSERT_IN_VM
;
CompilerThread
*
thread
=
CompilerThread
::
current
();
CompilerThread
*
thread
=
CompilerThread
::
current
();
...
@@ -143,7 +143,7 @@ ciField::ciField(ciInstanceKlass* klass, int index): _known_to_link_with(NULL) {
...
@@ -143,7 +143,7 @@ ciField::ciField(ciInstanceKlass* klass, int index): _known_to_link_with(NULL) {
initialize_from
(
&
field_desc
);
initialize_from
(
&
field_desc
);
}
}
ciField
::
ciField
(
fieldDescriptor
*
fd
)
:
_known_to_link_with
(
NULL
)
{
ciField
::
ciField
(
fieldDescriptor
*
fd
)
:
_known_to_link_with
_put
(
NULL
),
_known_to_link_with_get
(
NULL
)
{
ASSERT_IN_VM
;
ASSERT_IN_VM
;
_cp_index
=
-
1
;
_cp_index
=
-
1
;
...
@@ -315,6 +315,10 @@ ciType* ciField::compute_type_impl() {
...
@@ -315,6 +315,10 @@ ciType* ciField::compute_type_impl() {
bool
ciField
::
will_link
(
ciInstanceKlass
*
accessing_klass
,
bool
ciField
::
will_link
(
ciInstanceKlass
*
accessing_klass
,
Bytecodes
::
Code
bc
)
{
Bytecodes
::
Code
bc
)
{
VM_ENTRY_MARK
;
VM_ENTRY_MARK
;
assert
(
bc
==
Bytecodes
::
_getstatic
||
bc
==
Bytecodes
::
_putstatic
||
bc
==
Bytecodes
::
_getfield
||
bc
==
Bytecodes
::
_putfield
,
"unexpected bytecode"
);
if
(
_offset
==
-
1
)
{
if
(
_offset
==
-
1
)
{
// at creation we couldn't link to our holder so we need to
// at creation we couldn't link to our holder so we need to
// maintain that stance, otherwise there's no safe way to use this
// maintain that stance, otherwise there's no safe way to use this
...
@@ -322,9 +326,23 @@ bool ciField::will_link(ciInstanceKlass* accessing_klass,
...
@@ -322,9 +326,23 @@ bool ciField::will_link(ciInstanceKlass* accessing_klass,
return
false
;
return
false
;
}
}
if
(
_known_to_link_with
==
accessing_klass
)
{
// Check for static/nonstatic mismatch
bool
is_static
=
(
bc
==
Bytecodes
::
_getstatic
||
bc
==
Bytecodes
::
_putstatic
);
if
(
is_static
!=
this
->
is_static
())
{
return
false
;
}
// Get and put can have different accessibility rules
bool
is_put
=
(
bc
==
Bytecodes
::
_putfield
||
bc
==
Bytecodes
::
_putstatic
);
if
(
is_put
)
{
if
(
_known_to_link_with_put
==
accessing_klass
)
{
return
true
;
return
true
;
}
}
}
else
{
if
(
_known_to_link_with_get
==
accessing_klass
)
{
return
true
;
}
}
FieldAccessInfo
result
;
FieldAccessInfo
result
;
constantPoolHandle
c_pool
(
THREAD
,
constantPoolHandle
c_pool
(
THREAD
,
...
@@ -334,8 +352,13 @@ bool ciField::will_link(ciInstanceKlass* accessing_klass,
...
@@ -334,8 +352,13 @@ bool ciField::will_link(ciInstanceKlass* accessing_klass,
true
,
false
,
KILL_COMPILE_ON_FATAL_
(
false
));
true
,
false
,
KILL_COMPILE_ON_FATAL_
(
false
));
// update the hit-cache, unless there is a problem with memory scoping:
// update the hit-cache, unless there is a problem with memory scoping:
if
(
accessing_klass
->
is_shared
()
||
!
is_shared
())
if
(
accessing_klass
->
is_shared
()
||
!
is_shared
())
{
_known_to_link_with
=
accessing_klass
;
if
(
is_put
)
{
_known_to_link_with_put
=
accessing_klass
;
}
else
{
_known_to_link_with_get
=
accessing_klass
;
}
}
return
true
;
return
true
;
}
}
...
...
hotspot/src/share/vm/ci/ciField.hpp
浏览文件 @
532491e6
/*
/*
* Copyright (c) 1999, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 201
2
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -49,7 +49,8 @@ private:
...
@@ -49,7 +49,8 @@ private:
ciType
*
_type
;
ciType
*
_type
;
int
_offset
;
int
_offset
;
bool
_is_constant
;
bool
_is_constant
;
ciInstanceKlass
*
_known_to_link_with
;
ciInstanceKlass
*
_known_to_link_with_put
;
ciInstanceKlass
*
_known_to_link_with_get
;
ciConstant
_constant_value
;
ciConstant
_constant_value
;
// Used for will_link
// Used for will_link
...
...
hotspot/src/share/vm/classfile/verifier.cpp
浏览文件 @
532491e6
...
@@ -1884,10 +1884,10 @@ void ClassVerifier::verify_invoke_init(
...
@@ -1884,10 +1884,10 @@ void ClassVerifier::verify_invoke_init(
VerificationType
type
=
current_frame
->
pop_stack
(
VerificationType
type
=
current_frame
->
pop_stack
(
VerificationType
::
reference_check
(),
CHECK_VERIFY
(
this
));
VerificationType
::
reference_check
(),
CHECK_VERIFY
(
this
));
if
(
type
==
VerificationType
::
uninitialized_this_type
())
{
if
(
type
==
VerificationType
::
uninitialized_this_type
())
{
// The method must be an <init> method of
either this class, or one of it
s
// The method must be an <init> method of
this class or its superclas
s
// superclasses
klassOop
superk
=
current_class
()
->
super
();
if
(
ref_class_type
.
name
()
!=
current_class
()
->
name
()
&&
if
(
ref_class_type
.
name
()
!=
current_class
()
->
name
()
&&
!
name_in_supers
(
ref_class_type
.
name
(),
current_class
()
))
{
ref_class_type
.
name
()
!=
superk
->
klass_part
()
->
name
(
))
{
verify_error
(
bci
,
"Bad <init> method call"
);
verify_error
(
bci
,
"Bad <init> method call"
);
return
;
return
;
}
}
...
...
hotspot/src/share/vm/compiler/compilerOracle.cpp
浏览文件 @
532491e6
/*
/*
* Copyright (c) 1998, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 201
2
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -551,13 +551,21 @@ void CompilerOracle::parse_from_line(char* line) {
...
@@ -551,13 +551,21 @@ void CompilerOracle::parse_from_line(char* line) {
}
}
static
const
char
*
cc_file
()
{
static
const
char
*
cc_file
()
{
#ifdef ASSERT
if
(
CompileCommandFile
==
NULL
)
if
(
CompileCommandFile
==
NULL
)
return
".hotspot_compiler"
;
return
".hotspot_compiler"
;
#endif
return
CompileCommandFile
;
return
CompileCommandFile
;
}
}
bool
CompilerOracle
::
has_command_file
()
{
return
cc_file
()
!=
NULL
;
}
bool
CompilerOracle
::
_quiet
=
false
;
bool
CompilerOracle
::
_quiet
=
false
;
void
CompilerOracle
::
parse_from_file
()
{
void
CompilerOracle
::
parse_from_file
()
{
assert
(
has_command_file
(),
"command file must be specified"
);
FILE
*
stream
=
fopen
(
cc_file
(),
"rt"
);
FILE
*
stream
=
fopen
(
cc_file
(),
"rt"
);
if
(
stream
==
NULL
)
return
;
if
(
stream
==
NULL
)
return
;
...
@@ -600,6 +608,7 @@ void CompilerOracle::parse_from_string(const char* str, void (*parse_line)(char*
...
@@ -600,6 +608,7 @@ void CompilerOracle::parse_from_string(const char* str, void (*parse_line)(char*
}
}
void
CompilerOracle
::
append_comment_to_file
(
const
char
*
message
)
{
void
CompilerOracle
::
append_comment_to_file
(
const
char
*
message
)
{
assert
(
has_command_file
(),
"command file must be specified"
);
fileStream
stream
(
fopen
(
cc_file
(),
"at"
));
fileStream
stream
(
fopen
(
cc_file
(),
"at"
));
stream
.
print
(
"# "
);
stream
.
print
(
"# "
);
for
(
int
index
=
0
;
message
[
index
]
!=
'\0'
;
index
++
)
{
for
(
int
index
=
0
;
message
[
index
]
!=
'\0'
;
index
++
)
{
...
@@ -610,6 +619,7 @@ void CompilerOracle::append_comment_to_file(const char* message) {
...
@@ -610,6 +619,7 @@ void CompilerOracle::append_comment_to_file(const char* message) {
}
}
void
CompilerOracle
::
append_exclude_to_file
(
methodHandle
method
)
{
void
CompilerOracle
::
append_exclude_to_file
(
methodHandle
method
)
{
assert
(
has_command_file
(),
"command file must be specified"
);
fileStream
stream
(
fopen
(
cc_file
(),
"at"
));
fileStream
stream
(
fopen
(
cc_file
(),
"at"
));
stream
.
print
(
"exclude "
);
stream
.
print
(
"exclude "
);
Klass
::
cast
(
method
->
method_holder
())
->
name
()
->
print_symbol_on
(
&
stream
);
Klass
::
cast
(
method
->
method_holder
())
->
name
()
->
print_symbol_on
(
&
stream
);
...
@@ -624,7 +634,9 @@ void CompilerOracle::append_exclude_to_file(methodHandle method) {
...
@@ -624,7 +634,9 @@ void CompilerOracle::append_exclude_to_file(methodHandle method) {
void
compilerOracle_init
()
{
void
compilerOracle_init
()
{
CompilerOracle
::
parse_from_string
(
CompileCommand
,
CompilerOracle
::
parse_from_line
);
CompilerOracle
::
parse_from_string
(
CompileCommand
,
CompilerOracle
::
parse_from_line
);
CompilerOracle
::
parse_from_string
(
CompileOnly
,
CompilerOracle
::
parse_compile_only
);
CompilerOracle
::
parse_from_string
(
CompileOnly
,
CompilerOracle
::
parse_compile_only
);
if
(
CompilerOracle
::
has_command_file
())
{
CompilerOracle
::
parse_from_file
();
CompilerOracle
::
parse_from_file
();
}
if
(
lists
[
PrintCommand
]
!=
NULL
)
{
if
(
lists
[
PrintCommand
]
!=
NULL
)
{
if
(
PrintAssembly
)
{
if
(
PrintAssembly
)
{
warning
(
"CompileCommand and/or .hotspot_compiler file contains 'print' commands, but PrintAssembly is also enabled"
);
warning
(
"CompileCommand and/or .hotspot_compiler file contains 'print' commands, but PrintAssembly is also enabled"
);
...
...
hotspot/src/share/vm/compiler/compilerOracle.hpp
浏览文件 @
532491e6
/*
/*
* Copyright (c) 1998, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 201
2
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -36,6 +36,10 @@ class CompilerOracle : AllStatic {
...
@@ -36,6 +36,10 @@ class CompilerOracle : AllStatic {
static
bool
_quiet
;
static
bool
_quiet
;
public:
public:
// True if the command file has been specified or is implicit
static
bool
has_command_file
();
// Reads from file and adds to lists
// Reads from file and adds to lists
static
void
parse_from_file
();
static
void
parse_from_file
();
...
...
hotspot/src/share/vm/opto/runtime.cpp
浏览文件 @
532491e6
...
@@ -896,7 +896,8 @@ static void report_null_exception_in_code_cache(address exception_pc) {
...
@@ -896,7 +896,8 @@ static void report_null_exception_in_code_cache(address exception_pc) {
methodOop
method
=
((
nmethod
*
)
n
)
->
method
();
methodOop
method
=
((
nmethod
*
)
n
)
->
method
();
tty
->
print_cr
(
"# Method where it happened %s.%s "
,
Klass
::
cast
(
method
->
method_holder
())
->
name
()
->
as_C_string
(),
method
->
name
()
->
as_C_string
());
tty
->
print_cr
(
"# Method where it happened %s.%s "
,
Klass
::
cast
(
method
->
method_holder
())
->
name
()
->
as_C_string
(),
method
->
name
()
->
as_C_string
());
tty
->
print_cr
(
"#"
);
tty
->
print_cr
(
"#"
);
if
(
ShowMessageBoxOnError
&&
UpdateHotSpotCompilerFileOnError
)
{
if
(
ShowMessageBoxOnError
&&
UpdateHotSpotCompilerFileOnError
&&
CompilerOracle
::
has_command_file
())
{
const
char
*
title
=
"HotSpot Runtime Error"
;
const
char
*
title
=
"HotSpot Runtime Error"
;
const
char
*
question
=
"Do you want to exclude compilation of this method in future runs?"
;
const
char
*
question
=
"Do you want to exclude compilation of this method in future runs?"
;
if
(
os
::
message_box
(
title
,
question
))
{
if
(
os
::
message_box
(
title
,
question
))
{
...
...
hotspot/src/share/vm/runtime/arguments.cpp
浏览文件 @
532491e6
...
@@ -3017,12 +3017,14 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
...
@@ -3017,12 +3017,14 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
}
}
}
}
#ifdef ASSERT
// Parse default .hotspotrc settings file
// Parse default .hotspotrc settings file
if
(
!
settings_file_specified
)
{
if
(
!
settings_file_specified
)
{
if
(
!
process_settings_file
(
".hotspotrc"
,
false
,
args
->
ignoreUnrecognized
))
{
if
(
!
process_settings_file
(
".hotspotrc"
,
false
,
args
->
ignoreUnrecognized
))
{
return
JNI_EINVAL
;
return
JNI_EINVAL
;
}
}
}
}
#endif
if
(
PrintVMOptions
)
{
if
(
PrintVMOptions
)
{
for
(
index
=
0
;
index
<
args
->
nOptions
;
index
++
)
{
for
(
index
=
0
;
index
<
args
->
nOptions
;
index
++
)
{
...
...
hotspot/test/runtime/7110720/Test7110720.sh
0 → 100644
浏览文件 @
532491e6
#
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
#
# @test Test7110720.sh
# @bug 7110720
# @summary improve VM configuration file loading
# @run shell Test7110720.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
# Jtreg sets TESTVMOPTS which may include -d64 which is
# required to test a 64-bit JVM on some platforms.
# If another test harness still creates HOME/JDK64BIT,
# we can recognise that.
# set platform-dependent variables
OS
=
`
uname
-s
`
case
"
$OS
"
in
SunOS
|
Linux
)
FS
=
"/"
RM
=
/bin/rm
CP
=
/bin/cp
MV
=
/bin/mv
## for solaris, linux it's HOME
FILE_LOCATION
=
$HOME
if
[
-f
${
FILE_LOCATION
}${
FS
}
JDK64BIT
-a
${
OS
}
=
"SunOS"
]
then
TESTVMOPTS
=
`
cat
${
FILE_LOCATION
}${
FS
}
JDK64BIT
`
fi
;;
Windows_
*
)
FS
=
"
\\
"
RM
=
rm
CP
=
cp
MV
=
mv
;;
*
)
echo
"Unrecognized system!"
exit
1
;
;;
esac
JAVA
=
${
TESTJAVA
}${
FS
}
bin
${
FS
}
java
# Don't test debug builds, they do read the config files:
${
JAVA
}
${
TESTVMOPTS
}
-version
2>&1 |
grep
"debug"
>
/dev/null
if
[
"
$?
"
=
"0"
]
;
then
echo
Skipping
test
for
debug build.
exit
0
fi
ok
=
yes
$RM
-f
.hotspot_compiler .hotspotrc
${
JAVA
}
${
TESTVMOPTS
}
-version
2>&1 |
grep
"garbage in"
>
/dev/null
if
[
"
$?
"
=
"0"
]
;
then
echo
"FAILED: base case failure"
exit
1
fi
echo
"garbage in, garbage out"
>
.hotspot_compiler
${
JAVA
}
${
TESTVMOPTS
}
-version
2>&1 |
grep
"garbage in"
>
/dev/null
if
[
"
$?
"
=
"0"
]
;
then
echo
"FAILED: .hotspot_compiler was read"
ok
=
no
fi
$MV
.hotspot_compiler hs_comp.txt
${
JAVA
}
${
TESTVMOPTS
}
-XX
:CompileCommandFile
=
hs_comp.txt
-version
2>&1 |
grep
"garbage in"
>
/dev/null
if
[
"
$?
"
=
"1"
]
;
then
echo
"FAILED: explicit compiler command file not read"
ok
=
no
fi
$RM
-f
.hotspot_compiler hs_comp.txt
echo
"garbage"
>
.hotspotrc
${
JAVA
}
${
TESTVMOPTS
}
-version
2>&1 |
grep
"garbage"
>
/dev/null
if
[
"
$?
"
=
"0"
]
;
then
echo
"FAILED: .hotspotrc was read"
ok
=
no
fi
$MV
.hotspotrc hs_flags.txt
${
JAVA
}
${
TESTVMOPTS
}
-XX
:Flags
=
hs_flags.txt
-version
2>&1 |
grep
"garbage"
>
/dev/null
if
[
"
$?
"
=
"1"
]
;
then
echo
"FAILED: explicit flags file not read"
ok
=
no
fi
if
[
"
${
ok
}
"
=
"no"
]
;
then
echo
"Some tests failed."
exit
1
else
echo
"Passed"
exit
0
fi
hotspot/test/runtime/7160757/Test7160757.java
0 → 100644
浏览文件 @
532491e6
/*
* Copyright (c) 2012, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test Test7160757.java
* @bug 7160757
* @summary Tests that superclass initialization is not skipped
*/
public
class
Test7160757
{
public
static
void
main
(
String
args
[])
throws
Exception
{
ClassLoader
loader
=
new
SLoader
();
try
{
Class
.
forName
(
"S"
,
true
,
loader
);
System
.
out
.
println
(
"FAILED"
);
throw
new
Exception
(
"Should have thrown a VerifyError."
);
}
catch
(
VerifyError
e
)
{
System
.
out
.
println
(
e
);
System
.
out
.
println
(
"PASSED"
);
}
}
static
class
SLoader
extends
ClassLoader
{
/**
* public class S extends Throwable {
* public S() {
* aload_0
* invokespecial Object.<init>()
* return
* }
* }
*/
static
byte
b
(
int
i
)
{
return
(
byte
)
i
;
}
static
byte
S_class
[]
=
{
b
(
0xca
),
b
(
0xfe
),
b
(
0xba
),
b
(
0xbe
),
0x00
,
0x00
,
0x00
,
0x32
,
0x00
,
0x0c
,
0x0a
,
0x00
,
0x0b
,
0x00
,
0x07
,
0x07
,
0x00
,
0x08
,
0x07
,
0x00
,
0x09
,
0x01
,
0x00
,
0x06
,
0x3c
,
0x69
,
0x6e
,
0x69
,
0x74
,
0x3e
,
0x01
,
0x00
,
0x03
,
0x28
,
0x29
,
0x56
,
0x01
,
0x00
,
0x04
,
0x43
,
0x6f
,
0x64
,
0x65
,
0x0c
,
0x00
,
0x04
,
0x00
,
0x05
,
0x01
,
0x00
,
0x01
,
0x53
,
0x01
,
0x00
,
0x13
,
0x6a
,
0x61
,
0x76
,
0x61
,
0x2f
,
0x6c
,
0x61
,
0x6e
,
0x67
,
0x2f
,
0x54
,
0x68
,
0x72
,
0x6f
,
0x77
,
0x61
,
0x62
,
0x6c
,
0x65
,
0x01
,
0x00
,
0x10
,
0x6a
,
0x61
,
0x76
,
0x61
,
0x2f
,
0x6c
,
0x61
,
0x6e
,
0x67
,
0x2f
,
0x4f
,
0x62
,
0x6a
,
0x65
,
0x63
,
0x74
,
0x07
,
0x00
,
0x0a
,
0x00
,
0x21
,
0x00
,
0x02
,
0x00
,
0x03
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x01
,
0x00
,
0x01
,
0x00
,
0x04
,
0x00
,
0x05
,
0x00
,
0x01
,
0x00
,
0x06
,
0x00
,
0x00
,
0x00
,
0x11
,
0x00
,
0x01
,
0x00
,
0x01
,
0x00
,
0x00
,
0x00
,
0x05
,
0x2a
,
b
(
0xb7
),
0x00
,
0x01
,
b
(
0xb1
),
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
};
public
Class
findClass
(
String
name
)
throws
ClassNotFoundException
{
return
defineClass
(
name
,
S_class
,
0
,
S_class
.
length
);
}
}
}
test/Makefile
浏览文件 @
532491e6
...
@@ -74,7 +74,8 @@ JDK_NONDEFAULT_TEST_LIST = \
...
@@ -74,7 +74,8 @@ JDK_NONDEFAULT_TEST_LIST = \
jdk_rmi
\
jdk_rmi
\
jdk_sound
\
jdk_sound
\
jdk_swing
\
jdk_swing
\
jdk_tools1 jdk_tools2
jdk_tools1 jdk_tools2
\
jdk_jfr
# All jdk tests
# All jdk tests
JDK_ALL_TEST_LIST
=
$(JDK_DEFAULT_TEST_LIST)
$(JDK_NONDEFAULT_TEST_LIST)
JDK_ALL_TEST_LIST
=
$(JDK_DEFAULT_TEST_LIST)
$(JDK_NONDEFAULT_TEST_LIST)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录