1130 1131 // needs to remove object in file system 1132 AttachListener::abort(); 1133 1134 // flush buffered output, finish log files 1135 ostream_abort(); 1136 1137 // Check for abort hook 1138 abort_hook_t abort_hook = Arguments::abort_hook(); 1139 if (abort_hook != NULL) { 1140 abort_hook(); 1141 } 1142 } 1143 1144 // Note: os::abort() might be called very early during initialization, or 1145 // called from signal handler. Before adding something to os::abort(), make 1146 // sure it is async-safe and can handle partially initialized VM. 1147 void os::abort(bool dump_core, void* siginfo, const void* context) { 1148 os::shutdown(); 1149 if (dump_core) { 1150 #ifndef PRODUCT 1151 fdStream out(defaultStream::output_fd()); 1152 out.print_raw("Current thread is "); 1153 char buf[16]; 1154 jio_snprintf(buf, sizeof(buf), UINTX_FORMAT, os::current_thread_id()); 1155 out.print_raw_cr(buf); 1156 out.print_raw_cr("Dumping core ..."); 1157 #endif 1158 ::abort(); // dump core (for debugging) 1159 } 1160 1161 ::exit(1); 1162 } 1163 1164 // Die immediately, no exit hook, no abort hook, no cleanup. 1165 // Dump a core file, if possible, for debugging. 1166 void os::die() { 1167 if (TestUnresponsiveErrorHandler && !CreateCoredumpOnCrash) { 1168 // For TimeoutInErrorHandlingTest.java, we just kill the VM 1169 // and don't take the time to generate a core file. 1170 os::signal_raise(SIGKILL); 1171 } else { 1172 ::abort(); 1173 } 1174 } 1175 1176 // DLL functions 1177 | 1130 1131 // needs to remove object in file system 1132 AttachListener::abort(); 1133 1134 // flush buffered output, finish log files 1135 ostream_abort(); 1136 1137 // Check for abort hook 1138 abort_hook_t abort_hook = Arguments::abort_hook(); 1139 if (abort_hook != NULL) { 1140 abort_hook(); 1141 } 1142 } 1143 1144 // Note: os::abort() might be called very early during initialization, or 1145 // called from signal handler. Before adding something to os::abort(), make 1146 // sure it is async-safe and can handle partially initialized VM. 1147 void os::abort(bool dump_core, void* siginfo, const void* context) { 1148 os::shutdown(); 1149 if (dump_core) { 1150 ::abort(); // dump core (for debugging) 1151 } 1152 1153 ::exit(1); 1154 } 1155 1156 // Die immediately, no exit hook, no abort hook, no cleanup. 1157 // Dump a core file, if possible, for debugging. 1158 void os::die() { 1159 if (TestUnresponsiveErrorHandler && !CreateCoredumpOnCrash) { 1160 // For TimeoutInErrorHandlingTest.java, we just kill the VM 1161 // and don't take the time to generate a core file. 1162 os::signal_raise(SIGKILL); 1163 } else { 1164 ::abort(); 1165 } 1166 } 1167 1168 // DLL functions 1169 |