# HG changeset patch # User morris # Date 1363444869 25200 # Node ID 9ef47379df20fcaef900426abf7f0eef3e143e06 # Parent 0a2deac0bbfba4f212d937d29785f93776e7005b 8010144: [parfait] Null pointer deference in hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp Summary: add null check to signal handler Reviewed-by: dcubed diff -r 0a2deac0bbfb -r 9ef47379df20 src/os_cpu/linux_x86/vm/os_linux_x86.cpp --- a/src/os_cpu/linux_x86/vm/os_linux_x86.cpp Sat Mar 16 07:40:36 2013 -0700 +++ b/src/os_cpu/linux_x86/vm/os_linux_x86.cpp Sat Mar 16 07:41:09 2013 -0700 @@ -340,7 +340,7 @@ // here if the underlying file has been truncated. // Do not crash the VM in such a case. CodeBlob* cb = CodeCache::find_blob_unsafe(pc); - nmethod* nm = cb->is_nmethod() ? (nmethod*)cb : NULL; + nmethod* nm = (cb != NULL && cb->is_nmethod()) ? (nmethod*)cb : NULL; if (nm != NULL && nm->has_unsafe_access()) { stub = StubRoutines::handler_for_unsafe_access(); }