8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 6898462
27 * @summary failed reallocations of scalar replaced objects during deoptimization causes crash
28 * @run main/othervm -XX:-BackgroundCompilation -XX:CompileCommand=exclude,TestDeoptOOM::main -XX:CompileCommand=exclude,TestDeoptOOM::m9_1 -Xmx128M TestDeoptOOM
29 *
30 */
31
32 public class TestDeoptOOM {
33
34 long f1;
35 long f2;
36 long f3;
37 long f4;
38 long f5;
39
40 static class LinkedList {
41 LinkedList l;
42 long[] array;
43 LinkedList(LinkedList l, int size) {
44 array = new long[size];
45 this.l = l;
46 }
47 }
48
49 static LinkedList ll;
50
51 static void consume_all_memory() {
|
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 6898462
27 * @summary failed reallocations of scalar replaced objects during deoptimization causes crash
28 *
29 * @run main/othervm -XX:-BackgroundCompilation -Xmx128M
30 * -XX:CompileCommand=exclude,compiler.uncommontrap.TestDeoptOOM::main
31 * -XX:CompileCommand=exclude,compiler.uncommontrap.TestDeoptOOM::m9_1
32 * compiler.uncommontrap.TestDeoptOOM
33 */
34
35 package compiler.uncommontrap;
36
37 public class TestDeoptOOM {
38
39 long f1;
40 long f2;
41 long f3;
42 long f4;
43 long f5;
44
45 static class LinkedList {
46 LinkedList l;
47 long[] array;
48 LinkedList(LinkedList l, int size) {
49 array = new long[size];
50 this.l = l;
51 }
52 }
53
54 static LinkedList ll;
55
56 static void consume_all_memory() {
|