1 /* |
1 /* |
2 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
65 // First error, and its thread id. We must be able to handle native thread, |
65 // First error, and its thread id. We must be able to handle native thread, |
66 // so use thread id instead of Thread* to identify thread. |
66 // so use thread id instead of Thread* to identify thread. |
67 static VMError* volatile first_error; |
67 static VMError* volatile first_error; |
68 static volatile jlong first_error_tid; |
68 static volatile jlong first_error_tid; |
69 |
69 |
|
70 // Core dump status, false if we have been unable to write a core/minidump for some reason |
|
71 static bool coredump_status; |
|
72 |
|
73 // When coredump_status is set to true this will contain the name/path to the core/minidump, |
|
74 // if coredump_status if false, this will (hopefully) contain a useful error explaining why |
|
75 // no core/minidump has been written to disk |
|
76 static char coredump_message[O_BUFLEN]; |
|
77 |
70 // used by reporting about OOM |
78 // used by reporting about OOM |
71 size_t _size; |
79 size_t _size; |
72 |
80 |
73 // set signal handlers on Solaris/Linux or the default exception filter |
81 // set signal handlers on Solaris/Linux or the default exception filter |
74 // on Windows, to handle recursive crashes. |
82 // on Windows, to handle recursive crashes. |
104 VMError(const char* message); |
112 VMError(const char* message); |
105 |
113 |
106 // return a string to describe the error |
114 // return a string to describe the error |
107 char *error_string(char* buf, int buflen); |
115 char *error_string(char* buf, int buflen); |
108 |
116 |
|
117 // Report status of core/minidump |
|
118 static void report_coredump_status(const char* message, bool status); |
|
119 |
109 // main error reporting function |
120 // main error reporting function |
110 void report_and_die(); |
121 void report_and_die(); |
111 |
122 |
112 // reporting OutOfMemoryError |
123 // reporting OutOfMemoryError |
113 void report_java_out_of_memory(); |
124 void report_java_out_of_memory(); |