comparison src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp @ 8731:71f13276159d

8008560: [parfait] Null pointer deference in hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp Summary: add null pointer check in signal handler Reviewed-by: kvn
author morris
date Thu, 14 Mar 2013 07:44:18 -0700
parents 12285410684f
children 980532a806a5 5e3b6f79d280
comparison
equal deleted inserted replaced
8730:b7c2c5b2572c 8731:71f13276159d
514 #endif 514 #endif
515 // BugId 4454115: A read from a MappedByteBuffer can fault 515 // BugId 4454115: A read from a MappedByteBuffer can fault
516 // here if the underlying file has been truncated. 516 // here if the underlying file has been truncated.
517 // Do not crash the VM in such a case. 517 // Do not crash the VM in such a case.
518 CodeBlob* cb = CodeCache::find_blob_unsafe(pc); 518 CodeBlob* cb = CodeCache::find_blob_unsafe(pc);
519 nmethod* nm = cb->is_nmethod() ? (nmethod*)cb : NULL; 519 nmethod* nm = (cb != NULL && cb->is_nmethod()) ? (nmethod*)cb : NULL;
520 if (nm != NULL && nm->has_unsafe_access()) { 520 if (nm != NULL && nm->has_unsafe_access()) {
521 stub = StubRoutines::handler_for_unsafe_access(); 521 stub = StubRoutines::handler_for_unsafe_access();
522 } 522 }
523 } 523 }
524 else 524 else