3627
3628 // Print textual representation of sa_flags.
3629 st->print(", sa_flags=");
3630 os::Posix::print_sa_flags(st, sa.sa_flags);
3631
3632 // Check: is it our handler?
3633 if (handler == CAST_FROM_FN_PTR(address, (sa_sigaction_t)javaSignalHandler) ||
3634 handler == CAST_FROM_FN_PTR(address, (sa_sigaction_t)SR_handler)) {
3635 // It is our signal handler.
3636 // Check for flags, reset system-used one!
3637 if ((int)sa.sa_flags != os::Aix::get_our_sigflags(sig)) {
3638 st->print(", flags was changed from " PTR32_FORMAT ", consider using jsig library",
3639 os::Aix::get_our_sigflags(sig));
3640 }
3641 }
3642 st->cr();
3643 }
3644
3645
3646 #define DO_SIGNAL_CHECK(sig) \
3647 if (!sigismember(&check_signal_done, sig)) \
3648 os::Aix::check_signal_handler(sig)
3649
3650 // This method is a periodic task to check for misbehaving JNI applications
3651 // under CheckJNI, we can add any periodic checks here
3652
3653 void os::run_periodic_checks() {
3654
3655 if (check_signals == false) return;
3656
3657 // SEGV and BUS if overridden could potentially prevent
3658 // generation of hs*.log in the event of a crash, debugging
3659 // such a case can be very challenging, so we absolutely
3660 // check the following for a good measure:
3661 DO_SIGNAL_CHECK(SIGSEGV);
3662 DO_SIGNAL_CHECK(SIGILL);
3663 DO_SIGNAL_CHECK(SIGFPE);
3664 DO_SIGNAL_CHECK(SIGBUS);
3665 DO_SIGNAL_CHECK(SIGPIPE);
3666 DO_SIGNAL_CHECK(SIGXFSZ);
3667 if (UseSIGTRAP) {
|
3627
3628 // Print textual representation of sa_flags.
3629 st->print(", sa_flags=");
3630 os::Posix::print_sa_flags(st, sa.sa_flags);
3631
3632 // Check: is it our handler?
3633 if (handler == CAST_FROM_FN_PTR(address, (sa_sigaction_t)javaSignalHandler) ||
3634 handler == CAST_FROM_FN_PTR(address, (sa_sigaction_t)SR_handler)) {
3635 // It is our signal handler.
3636 // Check for flags, reset system-used one!
3637 if ((int)sa.sa_flags != os::Aix::get_our_sigflags(sig)) {
3638 st->print(", flags was changed from " PTR32_FORMAT ", consider using jsig library",
3639 os::Aix::get_our_sigflags(sig));
3640 }
3641 }
3642 st->cr();
3643 }
3644
3645
3646 #define DO_SIGNAL_CHECK(sig) \
3647 if (!sigismember(&check_signal_done, sig) && (sig != SIGINT || isatty(fileno(stdin)))) \
3648 os::Aix::check_signal_handler(sig)
3649
3650 // This method is a periodic task to check for misbehaving JNI applications
3651 // under CheckJNI, we can add any periodic checks here
3652
3653 void os::run_periodic_checks() {
3654
3655 if (check_signals == false) return;
3656
3657 // SEGV and BUS if overridden could potentially prevent
3658 // generation of hs*.log in the event of a crash, debugging
3659 // such a case can be very challenging, so we absolutely
3660 // check the following for a good measure:
3661 DO_SIGNAL_CHECK(SIGSEGV);
3662 DO_SIGNAL_CHECK(SIGILL);
3663 DO_SIGNAL_CHECK(SIGFPE);
3664 DO_SIGNAL_CHECK(SIGBUS);
3665 DO_SIGNAL_CHECK(SIGPIPE);
3666 DO_SIGNAL_CHECK(SIGXFSZ);
3667 if (UseSIGTRAP) {
|