Mercurial > hg > truffle
annotate test/runtime/ClassFile/OomWhileParsingRepeatedJsr.java @ 20199:5fbeae2a02d3
8043546: C1 optimizes @Stable instance fields with default values
Reviewed-by: kvn, jrose
author | vlivanov |
---|---|
date | Thu, 10 Jul 2014 12:04:43 -0700 |
parents | 88d6b9a1c27c |
children |
rev | line source |
---|---|
12217
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
1 /* |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
2 * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
4 * |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
7 * published by the Free Software Foundation. |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
8 * |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
13 * accompanied this code). |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
14 * |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
18 * |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
21 * questions. |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
22 */ |
8802
eca90b8a06eb
7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents:
6635
diff
changeset
|
23 |
2307
4a9604cd7c5f
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
24 |
4a9604cd7c5f
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
25 |
12217
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
26 /* |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
27 * @test OomWhileParsingRepeatedJsr |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
28 * @summary Testing class file parser; specifically parsing |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
29 * a file with repeated JSR (jump local subroutine) |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
30 * bytecode command. |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
31 * @bug 6878713 |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
32 * @bug 7030610 |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
33 * @bug 7037122 |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
34 * @bug 7123945 |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
35 * @bug 8016029 |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
36 * @library /testlibrary |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
37 * @run main OomWhileParsingRepeatedJsr |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
38 */ |
8802
eca90b8a06eb
7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents:
6635
diff
changeset
|
39 |
12217
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
40 import com.oracle.java.testlibrary.*; |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
41 |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
42 |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
43 public class OomWhileParsingRepeatedJsr { |
8802
eca90b8a06eb
7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents:
6635
diff
changeset
|
44 |
12217
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
45 public static void main(String[] args) throws Exception { |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
46 |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
47 // ======= Configure the test |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
48 String jarFile = System.getProperty("test.src") + "/testcase.jar"; |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
49 String className = "OOMCrashClass1960_2"; |
2307
4a9604cd7c5f
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
50 |
12217
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
51 // limit is 768MB in native words |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
52 int mallocMaxTestWords = (1024 * 1024 * 768 / 4); |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
53 if (Platform.is64bit()) |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
54 mallocMaxTestWords = (mallocMaxTestWords / 2); |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
55 |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
56 // ======= extract the test class |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
57 ProcessBuilder pb = new ProcessBuilder(new String[] { |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
58 JDKToolFinder.getJDKTool("jar"), |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
59 "xvf", jarFile } ); |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
60 OutputAnalyzer output = new OutputAnalyzer(pb.start()); |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
61 output.shouldHaveExitValue(0); |
8802
eca90b8a06eb
7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents:
6635
diff
changeset
|
62 |
12217
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
63 // ======= execute the test |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
64 pb = ProcessTools.createJavaProcessBuilder( |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
65 "-cp", ".", |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
66 "-XX:+UnlockDiagnosticVMOptions", |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
67 "-XX:MallocMaxTestWords=" + mallocMaxTestWords, |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
68 className ); |
8802
eca90b8a06eb
7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents:
6635
diff
changeset
|
69 |
12217
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
70 output = new OutputAnalyzer(pb.start()); |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
71 output.shouldContain("Cannot reserve enough memory"); |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
72 } |
88d6b9a1c27c
8016029: test runtime/6878713/Test6878713.sh failed
mseledtsov
parents:
8832
diff
changeset
|
73 } |
8802
eca90b8a06eb
7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents:
6635
diff
changeset
|
74 |