hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp
changeset 38209 b2a58604e046
parent 38190 ff9ac612c723
child 40010 e32d5e545789
equal deleted inserted replaced
38208:ff63d43b0480 38209:b2a58604e046
   582         // here if the underlying file has been truncated.
   582         // here if the underlying file has been truncated.
   583         // Do not crash the VM in such a case.
   583         // Do not crash the VM in such a case.
   584         CodeBlob* cb = CodeCache::find_blob_unsafe(pc);
   584         CodeBlob* cb = CodeCache::find_blob_unsafe(pc);
   585         CompiledMethod* nm = (cb != NULL) ? cb->as_compiled_method_or_null() : NULL;
   585         CompiledMethod* nm = (cb != NULL) ? cb->as_compiled_method_or_null() : NULL;
   586         if (nm != NULL && nm->has_unsafe_access()) {
   586         if (nm != NULL && nm->has_unsafe_access()) {
   587           stub = StubRoutines::handler_for_unsafe_access();
   587           address next_pc = Assembler::locate_next_instruction(pc);
       
   588           stub = SharedRuntime::handle_unsafe_access(thread, next_pc);
   588         }
   589         }
   589       }
   590       }
   590       else
   591       else
   591 
   592 
   592 #ifdef AMD64
   593 #ifdef AMD64
   653           stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
   654           stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
   654       }
   655       }
   655     } else if (thread->thread_state() == _thread_in_vm &&
   656     } else if (thread->thread_state() == _thread_in_vm &&
   656                sig == SIGBUS && /* info->si_code == BUS_OBJERR && */
   657                sig == SIGBUS && /* info->si_code == BUS_OBJERR && */
   657                thread->doing_unsafe_access()) {
   658                thread->doing_unsafe_access()) {
   658         stub = StubRoutines::handler_for_unsafe_access();
   659         address next_pc = Assembler::locate_next_instruction(pc);
       
   660         stub = SharedRuntime::handle_unsafe_access(thread, next_pc);
   659     }
   661     }
   660 
   662 
   661     // jni_fast_Get<Primitive>Field can trap at certain pc's if a GC kicks in
   663     // jni_fast_Get<Primitive>Field can trap at certain pc's if a GC kicks in
   662     // and the heap gets shrunk before the field access.
   664     // and the heap gets shrunk before the field access.
   663     if ((sig == SIGSEGV) || (sig == SIGBUS)) {
   665     if ((sig == SIGSEGV) || (sig == SIGBUS)) {