hotspot/test/runtime/ErrorHandling/TestCrashOnOutOfMemoryError.java
author stefank
Fri, 10 Jun 2016 14:06:36 +0200
changeset 39230 b991240ffb0d
parent 38152 80e5da81fb2c
child 40631 ed82623d7831
permissions -rw-r--r--
8159237: PreservedMarks verification code fails Reviewed-by: lmesnik, jwilhelm
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
34670
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
     1
/*
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
     2
 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
     4
 *
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
     7
 * published by the Free Software Foundation.
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
     8
 *
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    13
 * accompanied this code).
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    14
 *
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    18
 *
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    21
 * questions.
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    22
 */
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    23
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    24
/*
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    25
 * @test TestCrashOnOutOfMemoryError
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    26
 * @summary Test using -XX:+CrashOnOutOfMemoryError
38152
80e5da81fb2c 8154258: [TESTBUG] Various serviceability tests fail compilation
dsamersoff
parents: 34670
diff changeset
    27
 * @modules java.base/jdk.internal.misc
34670
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    28
 * @library /testlibrary
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    29
 * @build jdk.test.lib.*
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    30
 * @run driver TestCrashOnOutOfMemoryError
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    31
 * @bug 8138745
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    32
 */
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    33
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    34
import jdk.test.lib.OutputAnalyzer;
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    35
import jdk.test.lib.ProcessTools;
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    36
import java.io.BufferedReader;
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    37
import java.io.File;
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    38
import java.io.FileInputStream;
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    39
import java.io.InputStreamReader;
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    40
import java.io.IOException;
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    41
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    42
public class TestCrashOnOutOfMemoryError {
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    43
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    44
    public static void main(String[] args) throws Exception {
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    45
        if (args.length == 1) {
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    46
            // This should guarantee to throw:
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    47
            // java.lang.OutOfMemoryError: Requested array size exceeds VM limit
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    48
            try {
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    49
                Object[] oa = new Object[Integer.MAX_VALUE];
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    50
                throw new Error("OOME not triggered");
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    51
            } catch (OutOfMemoryError err) {
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    52
                throw new Error("OOME didn't abort JVM!");
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    53
            }
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    54
        }
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    55
        // else this is the main test
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    56
        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+CrashOnOutOfMemoryError",
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    57
                 "-XX:-CreateCoredumpOnCrash", "-Xmx64m", TestCrashOnOutOfMemoryError.class.getName(),"throwOOME");
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    58
        OutputAnalyzer output = new OutputAnalyzer(pb.start());
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    59
        int exitValue = output.getExitValue();
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    60
        if (0 == exitValue) {
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    61
            //expecting a non zero value
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    62
            throw new Error("Expected to get non zero exit value");
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    63
        }
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    64
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    65
        /* Output should look something like this. The actual text will depend on the OS and its core dump processing.
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    66
           Aborting due to java.lang.OutOfMemoryError: Requested array size exceeds VM limit
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    67
           # To suppress the following error report, specify this argument
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    68
           # after -XX: or in .hotspotrc:  SuppressErrorAt=/debug.cpp:303
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    69
           #
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    70
           # A fatal error has been detected by the Java Runtime Environment:
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    71
           #
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    72
           #  Internal Error (/home/cheleswer/Desktop/jdk9/dev/hotspot/src/share/vm/utilities/debug.cpp:303), pid=6212, tid=6213
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    73
           #  fatal error: OutOfMemory encountered: Requested array size exceeds VM limit
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    74
           #
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    75
           # JRE version: OpenJDK Runtime Environment (9.0) (build 1.9.0-internal-debug-cheleswer_2015_10_20_14_32-b00)
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    76
           # Java VM: OpenJDK 64-Bit Server VM (1.9.0-internal-debug-cheleswer_2015_10_20_14_32-b00, mixed mode, tiered, compressed oops, serial gc, linux-amd64)
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    77
           # Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %P" (or dumping to
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    78
             /home/cheleswer/Desktop/core.6212)
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    79
           #
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    80
           # An error report file with more information is saved as:
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    81
           # /home/cheleswer/Desktop/hs_err_pid6212.log
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    82
           #
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    83
           # If you would like to submit a bug report, please visit:
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    84
           #   http://bugreport.java.com/bugreport/crash.jsp
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    85
           #
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    86
           Current thread is 6213
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    87
           Dumping core ...
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    88
           Aborted (core dumped)
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    89
        */
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    90
        output.shouldContain("Aborting due to java.lang.OutOfMemoryError: Requested array size exceeds VM limit");
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    91
        // extract hs-err file
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    92
        String hs_err_file = output.firstMatch("# *(\\S*hs_err_pid\\d+\\.log)", 1);
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    93
        if (hs_err_file == null) {
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    94
            throw new Error("Did not find hs-err file in output.\n");
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    95
        }
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    96
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    97
        /*
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    98
         * Check if hs_err files exist or not
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
    99
         */
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
   100
        File f = new File(hs_err_file);
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
   101
        if (!f.exists()) {
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
   102
            throw new Error("hs-err file missing at "+ f.getAbsolutePath() + ".\n");
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
   103
        }
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
   104
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
   105
        /*
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
   106
         * Checking the completness of hs_err file. If last line of hs_err file is "END"
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
   107
         * then it proves that file is complete.
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
   108
         */
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
   109
        try (FileInputStream fis = new FileInputStream(f);
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
   110
            BufferedReader br = new BufferedReader(new InputStreamReader(fis))) {
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
   111
            String line = null;
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
   112
            String lastLine = null;
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
   113
            while ((line = br.readLine()) != null) {
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
   114
                lastLine = line;
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
   115
            }
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
   116
            if (!lastLine.equals("END.")) {
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
   117
                throw new Error("hs-err file incomplete (missing END marker.)");
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
   118
            } else {
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
   119
                System.out.println("End marker found.");
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
   120
            }
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
   121
        }
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
   122
        System.out.println("PASSED");
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
   123
    }
5ab871b40190 8138745: Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot
kevinw
parents:
diff changeset
   124
}