src/os/solaris/vm/os_solaris.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6536943 Sdiff src/os/solaris/vm

src/os/solaris/vm/os_solaris.cpp

Print this page
6536943: Bogus -Xcheck:jni warning for SIG_INT action for SIGINT in JVM started from non-interactive shell


4355   // is returned instead of restarting system calls
4356   } else if (sig == os::Solaris::SIGinterrupt()) {
4357     sigemptyset(&sigAct.sa_mask);
4358     sigAct.sa_handler = NULL;
4359     sigAct.sa_flags = SA_SIGINFO;
4360     sigAct.sa_sigaction = sigINTRHandler;
4361   } else {
4362     sigAct.sa_flags = SA_SIGINFO | SA_RESTART;
4363   }
4364   os::Solaris::set_our_sigflags(sig, sigAct.sa_flags);
4365 
4366   sigaction(sig, &sigAct, &oldAct);
4367 
4368   void* oldhand2 = oldAct.sa_sigaction ? CAST_FROM_FN_PTR(void*, oldAct.sa_sigaction)
4369                                        : CAST_FROM_FN_PTR(void*, oldAct.sa_handler);
4370   assert(oldhand2 == oldhand, "no concurrent signal handler installation");
4371 }
4372 
4373 
4374 #define DO_SIGNAL_CHECK(sig) \
4375   if (!sigismember(&check_signal_done, sig)) \
4376     os::Solaris::check_signal_handler(sig)
4377 
4378 // This method is a periodic task to check for misbehaving JNI applications
4379 // under CheckJNI, we can add any periodic checks here
4380 
4381 void os::run_periodic_checks() {
4382   // A big source of grief is hijacking virt. addr 0x0 on Solaris,
4383   // thereby preventing a NULL checks.
4384   if(!check_addr0_done) check_addr0_done = check_addr0(tty);
4385 
4386   if (check_signals == false) return;
4387 
4388   // SEGV and BUS if overridden could potentially prevent
4389   // generation of hs*.log in the event of a crash, debugging
4390   // such a case can be very challenging, so we absolutely
4391   // check for the following for a good measure:
4392   DO_SIGNAL_CHECK(SIGSEGV);
4393   DO_SIGNAL_CHECK(SIGILL);
4394   DO_SIGNAL_CHECK(SIGFPE);
4395   DO_SIGNAL_CHECK(SIGBUS);




4355   // is returned instead of restarting system calls
4356   } else if (sig == os::Solaris::SIGinterrupt()) {
4357     sigemptyset(&sigAct.sa_mask);
4358     sigAct.sa_handler = NULL;
4359     sigAct.sa_flags = SA_SIGINFO;
4360     sigAct.sa_sigaction = sigINTRHandler;
4361   } else {
4362     sigAct.sa_flags = SA_SIGINFO | SA_RESTART;
4363   }
4364   os::Solaris::set_our_sigflags(sig, sigAct.sa_flags);
4365 
4366   sigaction(sig, &sigAct, &oldAct);
4367 
4368   void* oldhand2 = oldAct.sa_sigaction ? CAST_FROM_FN_PTR(void*, oldAct.sa_sigaction)
4369                                        : CAST_FROM_FN_PTR(void*, oldAct.sa_handler);
4370   assert(oldhand2 == oldhand, "no concurrent signal handler installation");
4371 }
4372 
4373 
4374 #define DO_SIGNAL_CHECK(sig) \
4375   if (!sigismember(&check_signal_done, sig) && isatty(fileno(stdin))) \
4376     os::Solaris::check_signal_handler(sig)
4377 
4378 // This method is a periodic task to check for misbehaving JNI applications
4379 // under CheckJNI, we can add any periodic checks here
4380 
4381 void os::run_periodic_checks() {
4382   // A big source of grief is hijacking virt. addr 0x0 on Solaris,
4383   // thereby preventing a NULL checks.
4384   if(!check_addr0_done) check_addr0_done = check_addr0(tty);
4385 
4386   if (check_signals == false) return;
4387 
4388   // SEGV and BUS if overridden could potentially prevent
4389   // generation of hs*.log in the event of a crash, debugging
4390   // such a case can be very challenging, so we absolutely
4391   // check for the following for a good measure:
4392   DO_SIGNAL_CHECK(SIGSEGV);
4393   DO_SIGNAL_CHECK(SIGILL);
4394   DO_SIGNAL_CHECK(SIGFPE);
4395   DO_SIGNAL_CHECK(SIGBUS);


src/os/solaris/vm/os_solaris.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File