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

src/os/bsd/vm/os_bsd.cpp

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


3260 
3261   st->print(", sa_flags=");
3262   os::Posix::print_sa_flags(st, sa.sa_flags);
3263 
3264   // Check: is it our handler?
3265   if(handler == CAST_FROM_FN_PTR(address, (sa_sigaction_t)signalHandler) ||
3266      handler == CAST_FROM_FN_PTR(address, (sa_sigaction_t)SR_handler)) {
3267     // It is our signal handler
3268     // check for flags, reset system-used one!
3269     if((int)sa.sa_flags != os::Bsd::get_our_sigflags(sig)) {
3270       st->print(
3271                 ", flags was changed from " PTR32_FORMAT ", consider using jsig library",
3272                 os::Bsd::get_our_sigflags(sig));
3273     }
3274   }
3275   st->cr();
3276 }
3277 
3278 
3279 #define DO_SIGNAL_CHECK(sig) \
3280   if (!sigismember(&check_signal_done, sig)) \
3281     os::Bsd::check_signal_handler(sig)
3282 
3283 // This method is a periodic task to check for misbehaving JNI applications
3284 // under CheckJNI, we can add any periodic checks here
3285 
3286 void os::run_periodic_checks() {
3287 
3288   if (check_signals == false) return;
3289 
3290   // SEGV and BUS if overridden could potentially prevent
3291   // generation of hs*.log in the event of a crash, debugging
3292   // such a case can be very challenging, so we absolutely
3293   // check the following for a good measure:
3294   DO_SIGNAL_CHECK(SIGSEGV);
3295   DO_SIGNAL_CHECK(SIGILL);
3296   DO_SIGNAL_CHECK(SIGFPE);
3297   DO_SIGNAL_CHECK(SIGBUS);
3298   DO_SIGNAL_CHECK(SIGPIPE);
3299   DO_SIGNAL_CHECK(SIGXFSZ);
3300 




3260 
3261   st->print(", sa_flags=");
3262   os::Posix::print_sa_flags(st, sa.sa_flags);
3263 
3264   // Check: is it our handler?
3265   if(handler == CAST_FROM_FN_PTR(address, (sa_sigaction_t)signalHandler) ||
3266      handler == CAST_FROM_FN_PTR(address, (sa_sigaction_t)SR_handler)) {
3267     // It is our signal handler
3268     // check for flags, reset system-used one!
3269     if((int)sa.sa_flags != os::Bsd::get_our_sigflags(sig)) {
3270       st->print(
3271                 ", flags was changed from " PTR32_FORMAT ", consider using jsig library",
3272                 os::Bsd::get_our_sigflags(sig));
3273     }
3274   }
3275   st->cr();
3276 }
3277 
3278 
3279 #define DO_SIGNAL_CHECK(sig) \
3280   if (!sigismember(&check_signal_done, sig) && isatty(fileno(stdin))) \
3281     os::Bsd::check_signal_handler(sig)
3282 
3283 // This method is a periodic task to check for misbehaving JNI applications
3284 // under CheckJNI, we can add any periodic checks here
3285 
3286 void os::run_periodic_checks() {
3287 
3288   if (check_signals == false) return;
3289 
3290   // SEGV and BUS if overridden could potentially prevent
3291   // generation of hs*.log in the event of a crash, debugging
3292   // such a case can be very challenging, so we absolutely
3293   // check the following for a good measure:
3294   DO_SIGNAL_CHECK(SIGSEGV);
3295   DO_SIGNAL_CHECK(SIGILL);
3296   DO_SIGNAL_CHECK(SIGFPE);
3297   DO_SIGNAL_CHECK(SIGBUS);
3298   DO_SIGNAL_CHECK(SIGPIPE);
3299   DO_SIGNAL_CHECK(SIGXFSZ);
3300 


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