< prev index next >

src/hotspot/os_cpu/linux_aarch64/os_linux_aarch64.cpp

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


 289 
 290   // Note: it's not uncommon that JNI code uses signal/sigset to install
 291   // then restore certain signal handler (e.g. to temporarily block SIGPIPE,
 292   // or have a SIGILL handler when detecting CPU type). When that happens,
 293   // JVM_handle_linux_signal() might be invoked with junk info/ucVoid. To
 294   // avoid unnecessary crash when libjsig is not preloaded, try handle signals
 295   // that do not require siginfo/ucontext first.
 296 
 297   if (sig == SIGPIPE || sig == SIGXFSZ) {
 298     // allow chained handler to go first
 299     if (os::Linux::chained_handler(sig, info, ucVoid)) {
 300       return true;
 301     } else {
 302       // Ignoring SIGPIPE/SIGXFSZ - see bugs 4229104 or 6499219
 303       return true;
 304     }
 305   }
 306 
 307 #ifdef CAN_SHOW_REGISTERS_ON_ASSERT
 308   if ((sig == SIGSEGV || sig == SIGBUS) && info != NULL && info->si_addr == g_assert_poison) {
 309     handle_assert_poison_fault(ucVoid, info->si_addr);
 310     return 1;

 311   }
 312 #endif
 313 
 314   JavaThread* thread = NULL;
 315   VMThread* vmthread = NULL;
 316   if (os::Linux::signal_handlers_are_installed) {
 317     if (t != NULL ){
 318       if(t->is_Java_thread()) {
 319         thread = (JavaThread*)t;
 320       }
 321       else if(t->is_VM_thread()){
 322         vmthread = (VMThread *)t;
 323       }
 324     }
 325   }
 326 /*
 327   NOTE: does not seem to work on linux.
 328   if (info == NULL || info->si_code <= 0 || info->si_code == SI_NOINFO) {
 329     // can't decode this kind of signal
 330     info = NULL;




 289 
 290   // Note: it's not uncommon that JNI code uses signal/sigset to install
 291   // then restore certain signal handler (e.g. to temporarily block SIGPIPE,
 292   // or have a SIGILL handler when detecting CPU type). When that happens,
 293   // JVM_handle_linux_signal() might be invoked with junk info/ucVoid. To
 294   // avoid unnecessary crash when libjsig is not preloaded, try handle signals
 295   // that do not require siginfo/ucontext first.
 296 
 297   if (sig == SIGPIPE || sig == SIGXFSZ) {
 298     // allow chained handler to go first
 299     if (os::Linux::chained_handler(sig, info, ucVoid)) {
 300       return true;
 301     } else {
 302       // Ignoring SIGPIPE/SIGXFSZ - see bugs 4229104 or 6499219
 303       return true;
 304     }
 305   }
 306 
 307 #ifdef CAN_SHOW_REGISTERS_ON_ASSERT
 308   if ((sig == SIGSEGV || sig == SIGBUS) && info != NULL && info->si_addr == g_assert_poison) {
 309     if (handle_assert_poison_fault(ucVoid, info->si_addr)) {
 310       return 1;
 311     }
 312   }
 313 #endif
 314 
 315   JavaThread* thread = NULL;
 316   VMThread* vmthread = NULL;
 317   if (os::Linux::signal_handlers_are_installed) {
 318     if (t != NULL ){
 319       if(t->is_Java_thread()) {
 320         thread = (JavaThread*)t;
 321       }
 322       else if(t->is_VM_thread()){
 323         vmthread = (VMThread *)t;
 324       }
 325     }
 326   }
 327 /*
 328   NOTE: does not seem to work on linux.
 329   if (info == NULL || info->si_code <= 0 || info->si_code == SI_NOINFO) {
 330     // can't decode this kind of signal
 331     info = NULL;


< prev index next >