--- a/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp Tue Dec 28 09:54:09 2010 -0500
+++ b/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp Mon Jan 03 14:09:11 2011 -0500
@@ -585,6 +585,13 @@
sigaddset(&newset, sig);
sigprocmask(SIG_UNBLOCK, &newset, NULL);
+ // Determine which sort of error to throw. Out of swap may signal
+ // on the thread stack, which could get a mapping error when touched.
+ address addr = (address) info->si_addr;
+ if (sig == SIGBUS && info->si_code == BUS_OBJERR && info->si_errno == ENOMEM) {
+ vm_exit_out_of_memory(0, "Out of swap space to map in thread stack.");
+ }
+
VMError err(t, sig, pc, info, ucVoid);
err.report_and_die();