author | alanb |
Thu, 01 Dec 2016 15:54:39 +0000 | |
changeset 42309 | 21f9f3fbc302 |
parent 40059 | c2304140ed64 |
permissions | -rw-r--r-- |
27921
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
1 |
/* |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
2 |
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
4 |
* |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
8 |
* |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
13 |
* accompanied this code). |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
14 |
* |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
18 |
* |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
21 |
* questions. |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
22 |
*/ |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
23 |
|
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
24 |
/* |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
25 |
* @test |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
26 |
* @bug 8064703 |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
27 |
* @summary Deoptimization between array allocation and arraycopy may result in non initialized array |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
28 |
* |
40059 | 29 |
* @run main/othervm -XX:-BackgroundCompilation -XX:-UseOnStackReplacement -XX:TypeProfileLevel=020 |
30 |
* compiler.arraycopy.TestArrayCopyNoInit |
|
27921
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
31 |
*/ |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
32 |
|
40059 | 33 |
package compiler.arraycopy; |
34 |
||
27921
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
35 |
public class TestArrayCopyNoInit { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
36 |
|
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
37 |
static int[] m1(int[] src) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
38 |
int[] dest = new int[10]; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
39 |
try { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
40 |
System.arraycopy(src, 0, dest, 0, 10); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
41 |
} catch (NullPointerException npe) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
42 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
43 |
return dest; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
44 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
45 |
|
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
46 |
static int[] m2(Object src, boolean flag) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
47 |
Class tmp = src.getClass(); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
48 |
if (flag) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
49 |
return null; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
50 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
51 |
int[] dest = new int[10]; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
52 |
try { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
53 |
System.arraycopy(src, 0, dest, 0, 10); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
54 |
} catch (ArrayStoreException npe) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
55 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
56 |
return dest; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
57 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
58 |
|
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
59 |
static int[] m3(int[] src, int src_offset) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
60 |
int tmp = src[0]; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
61 |
int[] dest = new int[10]; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
62 |
try { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
63 |
System.arraycopy(src, src_offset, dest, 0, 10); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
64 |
} catch (IndexOutOfBoundsException npe) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
65 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
66 |
return dest; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
67 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
68 |
|
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
69 |
static int[] m4(int[] src, int length) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
70 |
int tmp = src[0]; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
71 |
int[] dest = new int[10]; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
72 |
try { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
73 |
System.arraycopy(src, 0, dest, 0, length); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
74 |
} catch (IndexOutOfBoundsException npe) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
75 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
76 |
return dest; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
77 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
78 |
|
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
79 |
static TestArrayCopyNoInit[] m5(Object[] src) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
80 |
Object tmp = src[0]; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
81 |
TestArrayCopyNoInit[] dest = new TestArrayCopyNoInit[10]; |
30185 | 82 |
System.arraycopy(src, 0, dest, 0, 10); |
27921
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
83 |
return dest; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
84 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
85 |
|
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
86 |
static class A { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
87 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
88 |
|
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
89 |
static class B extends A { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
90 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
91 |
|
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
92 |
static class C extends B { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
93 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
94 |
|
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
95 |
static class D extends C { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
96 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
97 |
|
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
98 |
static class E extends D { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
99 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
100 |
|
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
101 |
static class F extends E { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
102 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
103 |
|
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
104 |
static class G extends F { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
105 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
106 |
|
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
107 |
static class H extends G { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
108 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
109 |
|
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
110 |
static class I extends H { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
111 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
112 |
|
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
113 |
static H[] m6(Object[] src) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
114 |
Object tmp = src[0]; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
115 |
H[] dest = new H[10]; |
30185 | 116 |
System.arraycopy(src, 0, dest, 0, 10); |
27921
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
117 |
return dest; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
118 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
119 |
|
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
120 |
static Object m7_src(Object src) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
121 |
return src; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
122 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
123 |
|
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
124 |
static int[] m7(Object src, boolean flag) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
125 |
Class tmp = src.getClass(); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
126 |
if (flag) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
127 |
return null; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
128 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
129 |
src = m7_src(src); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
130 |
int[] dest = new int[10]; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
131 |
try { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
132 |
System.arraycopy(src, 0, dest, 0, 10); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
133 |
} catch (ArrayStoreException npe) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
134 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
135 |
return dest; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
136 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
137 |
|
28932
4df7f6cfac99
8072016: Array copy may cause infinite cycle of deoptimization/compilation
roland
parents:
27921
diff
changeset
|
138 |
static public void main(String[] args) { |
27921
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
139 |
boolean success = true; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
140 |
int[] src = new int[10]; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
141 |
TestArrayCopyNoInit[] src2 = new TestArrayCopyNoInit[10]; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
142 |
int[] res = null; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
143 |
TestArrayCopyNoInit[] res2 = null; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
144 |
Object src_obj = new Object(); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
145 |
|
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
146 |
for (int i = 0; i < 20000; i++) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
147 |
m1(src); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
148 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
149 |
|
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
150 |
res = m1(null); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
151 |
for (int i = 0; i < res.length; i++) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
152 |
if (res[i] != 0) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
153 |
success = false; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
154 |
System.out.println("Uninitialized array following NPE"); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
155 |
break; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
156 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
157 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
158 |
|
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
159 |
for (int i = 0; i < 20000; i++) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
160 |
if ((i%2) == 0) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
161 |
m2(src, false); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
162 |
} else { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
163 |
m2(src_obj, true); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
164 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
165 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
166 |
res = m2(src_obj, false); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
167 |
for (int i = 0; i < res.length; i++) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
168 |
if (res[i] != 0) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
169 |
success = false; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
170 |
System.out.println("Uninitialized array following failed array check"); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
171 |
break; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
172 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
173 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
174 |
|
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
175 |
for (int i = 0; i < 20000; i++) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
176 |
m3(src, 0); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
177 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
178 |
res = m3(src, -1); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
179 |
for (int i = 0; i < res.length; i++) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
180 |
if (res[i] != 0) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
181 |
success = false; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
182 |
System.out.println("Uninitialized array following failed src offset check"); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
183 |
break; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
184 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
185 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
186 |
|
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
187 |
for (int i = 0; i < 20000; i++) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
188 |
m4(src, 0); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
189 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
190 |
res = m4(src, -1); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
191 |
for (int i = 0; i < res.length; i++) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
192 |
if (res[i] != 0) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
193 |
success = false; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
194 |
System.out.println("Uninitialized array following failed length check"); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
195 |
break; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
196 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
197 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
198 |
|
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
199 |
for (int i = 0; i < 20000; i++) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
200 |
m5(src2); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
201 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
202 |
res2 = m5(new Object[10]); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
203 |
for (int i = 0; i < res2.length; i++) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
204 |
if (res2[i] != null) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
205 |
success = false; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
206 |
System.out.println("Uninitialized array following failed type check"); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
207 |
break; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
208 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
209 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
210 |
|
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
211 |
H[] src3 = new H[10]; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
212 |
I b = new I(); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
213 |
for (int i = 0; i < 20000; i++) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
214 |
m6(src3); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
215 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
216 |
H[] res3 = m6(new Object[10]); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
217 |
for (int i = 0; i < res3.length; i++) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
218 |
if (res3[i] != null) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
219 |
success = false; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
220 |
System.out.println("Uninitialized array following failed full type check"); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
221 |
break; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
222 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
223 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
224 |
|
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
225 |
for (int i = 0; i < 20000; i++) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
226 |
if ((i%2) == 0) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
227 |
m7(src, false); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
228 |
} else { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
229 |
m7(src_obj, true); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
230 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
231 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
232 |
res = m7(src_obj, false); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
233 |
for (int i = 0; i < res.length; i++) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
234 |
if (res[i] != 0) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
235 |
success = false; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
236 |
System.out.println("Uninitialized array following failed type check with return value profiling"); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
237 |
break; |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
238 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
239 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
240 |
|
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
241 |
if (!success) { |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
242 |
throw new RuntimeException("Some tests failed"); |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
243 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
244 |
} |
4b932655e504
8064703: crash running specjvm98's javac following 8060252
roland
parents:
diff
changeset
|
245 |
} |