< prev index next >

src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp

Print this page




 461           // NOTE: that we take the exception at the NEXT floating point instruction.
 462           assert(pc[0] == 0xDB, "not a FIST opcode");
 463           assert(pc[1] == 0x14, "not a FIST opcode");
 464           assert(pc[2] == 0x24, "not a FIST opcode");
 465           return true;
 466         } else if (op == 0xF7) {
 467           // IDIV
 468           stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_DIVIDE_BY_ZERO);
 469         } else {
 470           // TODO: handle more cases if we are using other x86 instructions
 471           //   that can generate SIGFPE signal on linux.
 472           tty->print_cr("unknown opcode 0x%X with SIGFPE.", op);
 473           fatal("please update this code.");
 474         }
 475 #endif // AMD64
 476       } else if (sig == SIGSEGV &&
 477                !MacroAssembler::needs_explicit_null_check((intptr_t)info->si_addr)) {
 478           // Determination of interpreter/vtable stub/compiled code null exception
 479           stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
 480       }
 481     } else if (thread->thread_state() == _thread_in_vm &&
 482                sig == SIGBUS && /* info->si_code == BUS_OBJERR && */
 483                thread->doing_unsafe_access()) {
 484         address next_pc = Assembler::locate_next_instruction(pc);
 485         stub = SharedRuntime::handle_unsafe_access(thread, next_pc);
 486     }
 487 
 488     // jni_fast_Get<Primitive>Field can trap at certain pc's if a GC kicks in
 489     // and the heap gets shrunk before the field access.
 490     if ((sig == SIGSEGV) || (sig == SIGBUS)) {
 491       address addr = JNI_FastGetField::find_slowcase_pc(pc);
 492       if (addr != (address)-1) {
 493         stub = addr;
 494       }
 495     }
 496 
 497     // Check to see if we caught the safepoint code in the
 498     // process of write protecting the memory serialization page.
 499     // It write enables the page immediately after protecting it
 500     // so we can just return to retry the write.
 501     if ((sig == SIGSEGV) &&
 502         os::is_memory_serialize_page(thread, (address) info->si_addr)) {




 461           // NOTE: that we take the exception at the NEXT floating point instruction.
 462           assert(pc[0] == 0xDB, "not a FIST opcode");
 463           assert(pc[1] == 0x14, "not a FIST opcode");
 464           assert(pc[2] == 0x24, "not a FIST opcode");
 465           return true;
 466         } else if (op == 0xF7) {
 467           // IDIV
 468           stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_DIVIDE_BY_ZERO);
 469         } else {
 470           // TODO: handle more cases if we are using other x86 instructions
 471           //   that can generate SIGFPE signal on linux.
 472           tty->print_cr("unknown opcode 0x%X with SIGFPE.", op);
 473           fatal("please update this code.");
 474         }
 475 #endif // AMD64
 476       } else if (sig == SIGSEGV &&
 477                !MacroAssembler::needs_explicit_null_check((intptr_t)info->si_addr)) {
 478           // Determination of interpreter/vtable stub/compiled code null exception
 479           stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
 480       }
 481     } else if (sig == SIGBUS && /* info->si_code == BUS_OBJERR && */

 482                thread->doing_unsafe_access()) {
 483         address next_pc = Assembler::locate_next_instruction(pc);
 484         stub = SharedRuntime::handle_unsafe_access(thread, next_pc);
 485     }
 486 
 487     // jni_fast_Get<Primitive>Field can trap at certain pc's if a GC kicks in
 488     // and the heap gets shrunk before the field access.
 489     if ((sig == SIGSEGV) || (sig == SIGBUS)) {
 490       address addr = JNI_FastGetField::find_slowcase_pc(pc);
 491       if (addr != (address)-1) {
 492         stub = addr;
 493       }
 494     }
 495 
 496     // Check to see if we caught the safepoint code in the
 497     // process of write protecting the memory serialization page.
 498     // It write enables the page immediately after protecting it
 499     // so we can just return to retry the write.
 500     if ((sig == SIGSEGV) &&
 501         os::is_memory_serialize_page(thread, (address) info->si_addr)) {


< prev index next >