equal
deleted
inserted
replaced
418 // here if the underlying file has been truncated. |
418 // here if the underlying file has been truncated. |
419 // Do not crash the VM in such a case. |
419 // Do not crash the VM in such a case. |
420 CodeBlob* cb = CodeCache::find_blob_unsafe(pc); |
420 CodeBlob* cb = CodeCache::find_blob_unsafe(pc); |
421 CompiledMethod* nm = (cb != NULL) ? cb->as_compiled_method_or_null() : NULL; |
421 CompiledMethod* nm = (cb != NULL) ? cb->as_compiled_method_or_null() : NULL; |
422 if (nm != NULL && nm->has_unsafe_access()) { |
422 if (nm != NULL && nm->has_unsafe_access()) { |
423 stub = StubRoutines::handler_for_unsafe_access(); |
423 address next_pc = Assembler::locate_next_instruction(pc); |
|
424 stub = SharedRuntime::handle_unsafe_access(thread, next_pc); |
424 } |
425 } |
425 } |
426 } |
426 else |
427 else |
427 |
428 |
428 #ifdef AMD64 |
429 #ifdef AMD64 |
467 stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL); |
468 stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL); |
468 } |
469 } |
469 } else if (thread->thread_state() == _thread_in_vm && |
470 } else if (thread->thread_state() == _thread_in_vm && |
470 sig == SIGBUS && /* info->si_code == BUS_OBJERR && */ |
471 sig == SIGBUS && /* info->si_code == BUS_OBJERR && */ |
471 thread->doing_unsafe_access()) { |
472 thread->doing_unsafe_access()) { |
472 stub = StubRoutines::handler_for_unsafe_access(); |
473 address next_pc = Assembler::locate_next_instruction(pc); |
|
474 stub = SharedRuntime::handle_unsafe_access(thread, next_pc); |
473 } |
475 } |
474 |
476 |
475 // jni_fast_Get<Primitive>Field can trap at certain pc's if a GC kicks in |
477 // jni_fast_Get<Primitive>Field can trap at certain pc's if a GC kicks in |
476 // and the heap gets shrunk before the field access. |
478 // and the heap gets shrunk before the field access. |
477 if ((sig == SIGSEGV) || (sig == SIGBUS)) { |
479 if ((sig == SIGSEGV) || (sig == SIGBUS)) { |