Mercurial > hg > truffle
comparison src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp @ 2095:36c186bcc085
6302804: Hotspot VM dies ungraceful death when C heap is exhausted in various places.
Summary: enhance the error reporting mechanism to help user to fix the problem rather than making it look like a VM error.
Reviewed-by: kvn, kamg
author | coleenp |
---|---|
date | Mon, 03 Jan 2011 14:09:11 -0500 |
parents | 828eafbd85cc |
children | d70fe6ab4436 |
comparison
equal
deleted
inserted
replaced
2075:06e4b9c9db76 | 2095:36c186bcc085 |
---|---|
583 sigset_t newset; | 583 sigset_t newset; |
584 sigemptyset(&newset); | 584 sigemptyset(&newset); |
585 sigaddset(&newset, sig); | 585 sigaddset(&newset, sig); |
586 sigprocmask(SIG_UNBLOCK, &newset, NULL); | 586 sigprocmask(SIG_UNBLOCK, &newset, NULL); |
587 | 587 |
588 // Determine which sort of error to throw. Out of swap may signal | |
589 // on the thread stack, which could get a mapping error when touched. | |
590 address addr = (address) info->si_addr; | |
591 if (sig == SIGBUS && info->si_code == BUS_OBJERR && info->si_errno == ENOMEM) { | |
592 vm_exit_out_of_memory(0, "Out of swap space to map in thread stack."); | |
593 } | |
594 | |
588 VMError err(t, sig, pc, info, ucVoid); | 595 VMError err(t, sig, pc, info, ucVoid); |
589 err.report_and_die(); | 596 err.report_and_die(); |
590 | 597 |
591 ShouldNotReachHere(); | 598 ShouldNotReachHere(); |
592 } | 599 } |