< prev index next >

src/os/solaris/vm/os_solaris.cpp

Print this page

        

*** 1012,1022 **** // The thread is returned suspended (in state INITIALIZED), and is started higher up in the call chain return true; } debug_only(static bool signal_sets_initialized = false); ! static sigset_t unblocked_sigs, vm_sigs, allowdebug_blocked_sigs; bool os::Solaris::is_sig_ignored(int sig) { struct sigaction oact; sigaction(sig, (struct sigaction*)NULL, &oact); void* ohlr = oact.sa_sigaction ? CAST_FROM_FN_PTR(void*, oact.sa_sigaction) --- 1012,1022 ---- // The thread is returned suspended (in state INITIALIZED), and is started higher up in the call chain return true; } debug_only(static bool signal_sets_initialized = false); ! static sigset_t unblocked_sigs, vm_sigs; bool os::Solaris::is_sig_ignored(int sig) { struct sigaction oact; sigaction(sig, (struct sigaction*)NULL, &oact); void* ohlr = oact.sa_sigaction ? CAST_FROM_FN_PTR(void*, oact.sa_sigaction)
*** 1043,1071 **** // interference with shutdown hooks and BREAK_SIGNAL thread dumping. // (See bug 4345157, and other related bugs). // In reality, though, unblocking these signals is really a nop, since // these signals are not blocked by default. sigemptyset(&unblocked_sigs); - sigemptyset(&allowdebug_blocked_sigs); sigaddset(&unblocked_sigs, SIGILL); sigaddset(&unblocked_sigs, SIGSEGV); sigaddset(&unblocked_sigs, SIGBUS); sigaddset(&unblocked_sigs, SIGFPE); sigaddset(&unblocked_sigs, ASYNC_SIGNAL); if (!ReduceSignalUsage) { if (!os::Solaris::is_sig_ignored(SHUTDOWN1_SIGNAL)) { sigaddset(&unblocked_sigs, SHUTDOWN1_SIGNAL); - sigaddset(&allowdebug_blocked_sigs, SHUTDOWN1_SIGNAL); } if (!os::Solaris::is_sig_ignored(SHUTDOWN2_SIGNAL)) { sigaddset(&unblocked_sigs, SHUTDOWN2_SIGNAL); - sigaddset(&allowdebug_blocked_sigs, SHUTDOWN2_SIGNAL); } if (!os::Solaris::is_sig_ignored(SHUTDOWN3_SIGNAL)) { sigaddset(&unblocked_sigs, SHUTDOWN3_SIGNAL); - sigaddset(&allowdebug_blocked_sigs, SHUTDOWN3_SIGNAL); } } // Fill in signals that are blocked by all but the VM thread. sigemptyset(&vm_sigs); if (!ReduceSignalUsage) { --- 1043,1067 ----
*** 1089,1105 **** sigset_t* os::Solaris::vm_signals() { assert(signal_sets_initialized, "Not initialized"); return &vm_sigs; } - // These are signals that are blocked during cond_wait to allow debugger in - sigset_t* os::Solaris::allowdebug_blocked_signals() { - assert(signal_sets_initialized, "Not initialized"); - return &allowdebug_blocked_sigs; - } - - void _handle_uncaught_cxx_exception() { VMError::report_and_die("An uncaught C++ exception"); } --- 1085,1094 ----
*** 5350,5367 **** // correctly with each other and Java-level accesses. OrderAccess::fence(); return; } - #ifdef ASSERT - // Don't catch signals while blocked; let the running threads have the signals. - // (This allows a debugger to break into the running thread.) - sigset_t oldsigs; - sigset_t* allowdebug_blocked = os::Solaris::allowdebug_blocked_signals(); - pthread_sigmask(SIG_BLOCK, allowdebug_blocked, &oldsigs); - #endif - OSThreadWaitState osts(thread->osthread(), false /* not Object.wait() */); jt->set_suspend_equivalent(); // cleared by handle_special_suspend_equivalent_condition() or java_suspend_self() // Do this the hard way by blocking ... --- 5339,5348 ----
*** 5381,5393 **** // versions of the Solaris. assert_status(status == 0 || status == EINTR || status == ETIME || status == ETIMEDOUT, status, "cond_timedwait"); - #ifdef ASSERT - pthread_sigmask(SIG_SETMASK, &oldsigs, NULL); - #endif _counter = 0; status = os::Solaris::mutex_unlock(_mutex); assert_status(status == 0, status, "mutex_unlock"); // Paranoia to ensure our locked and lock-free paths interact // correctly with each other and Java-level accesses. --- 5362,5371 ----
< prev index next >