227 { |
227 { |
228 report_vm_error(file, line, "fatal error", message); |
228 report_vm_error(file, line, "fatal error", message); |
229 } |
229 } |
230 |
230 |
231 void report_vm_out_of_memory(const char* file, int line, size_t size, |
231 void report_vm_out_of_memory(const char* file, int line, size_t size, |
232 const char* message) { |
232 VMErrorType vm_err_type, const char* message) { |
233 if (Debugging) return; |
233 if (Debugging) return; |
234 |
234 |
235 Thread* thread = ThreadLocalStorage::get_thread_slow(); |
235 Thread* thread = ThreadLocalStorage::get_thread_slow(); |
236 VMError(thread, file, line, size, message).report_and_die(); |
236 VMError(thread, file, line, size, vm_err_type, message).report_and_die(); |
237 |
237 |
238 // The UseOSErrorReporting option in report_and_die() may allow a return |
238 // The UseOSErrorReporting option in report_and_die() may allow a return |
239 // to here. If so then we'll have to figure out how to handle it. |
239 // to here. If so then we'll have to figure out how to handle it. |
240 guarantee(false, "report_and_die() should not return here"); |
240 guarantee(false, "report_and_die() should not return here"); |
241 } |
241 } |
342 "%s%s# %s%s# %s%s# %s%s# %s%s# " |
342 "%s%s# %s%s# %s%s# %s%s# %s%s# " |
343 "%s%s# %s%s# %s%s# %s%s# %s", |
343 "%s%s# %s%s# %s%s# %s%s# %s", |
344 msg, eol, msg, eol, msg, eol, msg, eol, msg, eol, |
344 msg, eol, msg, eol, msg, eol, msg, eol, msg, eol, |
345 msg, eol, msg, eol, msg, eol, msg, eol, msg, eol, |
345 msg, eol, msg, eol, msg, eol, msg, eol, msg, eol, |
346 msg, eol, msg, eol, msg, eol, msg, eol, msg)); |
346 msg, eol, msg, eol, msg, eol, msg, eol, msg)); |
347 case 8: vm_exit_out_of_memory(num, "ChunkPool::allocate"); |
347 case 8: vm_exit_out_of_memory(num, OOM_MALLOC_ERROR, "ChunkPool::allocate"); |
348 case 9: ShouldNotCallThis(); |
348 case 9: ShouldNotCallThis(); |
349 case 10: ShouldNotReachHere(); |
349 case 10: ShouldNotReachHere(); |
350 case 11: Unimplemented(); |
350 case 11: Unimplemented(); |
351 // This is last because it does not generate an hs_err* file on Windows. |
351 // This is last because it does not generate an hs_err* file on Windows. |
352 case 12: os::signal_raise(SIGSEGV); |
352 case 12: os::signal_raise(SIGSEGV); |