< prev index next >

src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp

Print this page




 645           // NOTE: that we take the exception at the NEXT floating point instruction.
 646           assert(pc[0] == 0xDB, "not a FIST opcode");
 647           assert(pc[1] == 0x14, "not a FIST opcode");
 648           assert(pc[2] == 0x24, "not a FIST opcode");
 649           return true;
 650         } else if (op == 0xF7) {
 651           // IDIV
 652           stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_DIVIDE_BY_ZERO);
 653         } else {
 654           // TODO: handle more cases if we are using other x86 instructions
 655           //   that can generate SIGFPE signal on bsd.
 656           tty->print_cr("unknown opcode 0x%X with SIGFPE.", op);
 657           fatal("please update this code.");
 658         }
 659 #endif // AMD64
 660       } else if ((sig == SIGSEGV || sig == SIGBUS) &&
 661                !MacroAssembler::needs_explicit_null_check((intptr_t)info->si_addr)) {
 662           // Determination of interpreter/vtable stub/compiled code null exception
 663           stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
 664       }
 665     } else if (thread->thread_state() == _thread_in_vm &&
 666                sig == SIGBUS && /* info->si_code == BUS_OBJERR && */
 667                thread->doing_unsafe_access()) {
 668         address next_pc = Assembler::locate_next_instruction(pc);
 669         stub = SharedRuntime::handle_unsafe_access(thread, next_pc);
 670     }
 671 
 672     // jni_fast_Get<Primitive>Field can trap at certain pc's if a GC kicks in
 673     // and the heap gets shrunk before the field access.
 674     if ((sig == SIGSEGV) || (sig == SIGBUS)) {
 675       address addr = JNI_FastGetField::find_slowcase_pc(pc);
 676       if (addr != (address)-1) {
 677         stub = addr;
 678       }
 679     }
 680 
 681     // Check to see if we caught the safepoint code in the
 682     // process of write protecting the memory serialization page.
 683     // It write enables the page immediately after protecting it
 684     // so we can just return to retry the write.
 685     if ((sig == SIGSEGV || sig == SIGBUS) &&
 686         os::is_memory_serialize_page(thread, (address) info->si_addr)) {




 645           // NOTE: that we take the exception at the NEXT floating point instruction.
 646           assert(pc[0] == 0xDB, "not a FIST opcode");
 647           assert(pc[1] == 0x14, "not a FIST opcode");
 648           assert(pc[2] == 0x24, "not a FIST opcode");
 649           return true;
 650         } else if (op == 0xF7) {
 651           // IDIV
 652           stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_DIVIDE_BY_ZERO);
 653         } else {
 654           // TODO: handle more cases if we are using other x86 instructions
 655           //   that can generate SIGFPE signal on bsd.
 656           tty->print_cr("unknown opcode 0x%X with SIGFPE.", op);
 657           fatal("please update this code.");
 658         }
 659 #endif // AMD64
 660       } else if ((sig == SIGSEGV || sig == SIGBUS) &&
 661                !MacroAssembler::needs_explicit_null_check((intptr_t)info->si_addr)) {
 662           // Determination of interpreter/vtable stub/compiled code null exception
 663           stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
 664       }
 665     } else if (sig == SIGBUS && /* info->si_code == BUS_OBJERR && */

 666                thread->doing_unsafe_access()) {
 667         address next_pc = Assembler::locate_next_instruction(pc);
 668         stub = SharedRuntime::handle_unsafe_access(thread, next_pc);
 669     }
 670 
 671     // jni_fast_Get<Primitive>Field can trap at certain pc's if a GC kicks in
 672     // and the heap gets shrunk before the field access.
 673     if ((sig == SIGSEGV) || (sig == SIGBUS)) {
 674       address addr = JNI_FastGetField::find_slowcase_pc(pc);
 675       if (addr != (address)-1) {
 676         stub = addr;
 677       }
 678     }
 679 
 680     // Check to see if we caught the safepoint code in the
 681     // process of write protecting the memory serialization page.
 682     // It write enables the page immediately after protecting it
 683     // so we can just return to retry the write.
 684     if ((sig == SIGSEGV || sig == SIGBUS) &&
 685         os::is_memory_serialize_page(thread, (address) info->si_addr)) {


< prev index next >