Mercurial > hg > graal-compiler
changeset 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 | b7c2c5b2572c |
children | fba788946616 a40807924950 |
files | src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp Wed Feb 13 10:25:09 2013 +0100 +++ b/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp Thu Mar 14 07:44:18 2013 -0700 @@ -516,7 +516,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(); }