< prev index next >

src/hotspot/os_cpu/linux_sparc/os_linux_sparc.cpp

Print this page
rev 55480 : [mq]: 8227275-native-oom-hanging-assertions


 493 
 494   // Note: it's not uncommon that JNI code uses signal/sigset to install
 495   // then restore certain signal handler (e.g. to temporarily block SIGPIPE,
 496   // or have a SIGILL handler when detecting CPU type). When that happens,
 497   // JVM_handle_linux_signal() might be invoked with junk info/ucVoid. To
 498   // avoid unnecessary crash when libjsig is not preloaded, try handle signals
 499   // that do not require siginfo/ucontext first.
 500 
 501   if (sig == SIGPIPE || sig == SIGXFSZ) {
 502     // allow chained handler to go first
 503     if (os::Linux::chained_handler(sig, info, ucVoid)) {
 504       return true;
 505     } else {
 506       // Ignoring SIGPIPE/SIGXFSZ - see bugs 4229104 or 6499219
 507       return true;
 508     }
 509   }
 510 
 511 #ifdef CAN_SHOW_REGISTERS_ON_ASSERT
 512   if ((sig == SIGSEGV || sig == SIGBUS) && info != NULL && info->si_addr == g_assert_poison) {
 513     handle_assert_poison_fault(ucVoid, info->si_addr);
 514     return 1;

 515   }
 516 #endif
 517 
 518   JavaThread* thread = NULL;
 519   VMThread* vmthread = NULL;
 520   if (os::Linux::signal_handlers_are_installed) {
 521     if (t != NULL ){
 522       if(t->is_Java_thread()) {
 523         thread = (JavaThread*)t;
 524       }
 525       else if(t->is_VM_thread()){
 526         vmthread = (VMThread *)t;
 527       }
 528     }
 529   }
 530 
 531   // decide if this trap can be handled by a stub
 532   address stub = NULL;
 533   address pc = NULL;
 534   address npc = NULL;




 493 
 494   // Note: it's not uncommon that JNI code uses signal/sigset to install
 495   // then restore certain signal handler (e.g. to temporarily block SIGPIPE,
 496   // or have a SIGILL handler when detecting CPU type). When that happens,
 497   // JVM_handle_linux_signal() might be invoked with junk info/ucVoid. To
 498   // avoid unnecessary crash when libjsig is not preloaded, try handle signals
 499   // that do not require siginfo/ucontext first.
 500 
 501   if (sig == SIGPIPE || sig == SIGXFSZ) {
 502     // allow chained handler to go first
 503     if (os::Linux::chained_handler(sig, info, ucVoid)) {
 504       return true;
 505     } else {
 506       // Ignoring SIGPIPE/SIGXFSZ - see bugs 4229104 or 6499219
 507       return true;
 508     }
 509   }
 510 
 511 #ifdef CAN_SHOW_REGISTERS_ON_ASSERT
 512   if ((sig == SIGSEGV || sig == SIGBUS) && info != NULL && info->si_addr == g_assert_poison) {
 513     if (handle_assert_poison_fault(ucVoid, info->si_addr)) {
 514       return 1;
 515     }
 516   }
 517 #endif
 518 
 519   JavaThread* thread = NULL;
 520   VMThread* vmthread = NULL;
 521   if (os::Linux::signal_handlers_are_installed) {
 522     if (t != NULL ){
 523       if(t->is_Java_thread()) {
 524         thread = (JavaThread*)t;
 525       }
 526       else if(t->is_VM_thread()){
 527         vmthread = (VMThread *)t;
 528       }
 529     }
 530   }
 531 
 532   // decide if this trap can be handled by a stub
 533   address stub = NULL;
 534   address pc = NULL;
 535   address npc = NULL;


< prev index next >