From 8542b93426e4fa82abd3d8b0d51722e6f7cff869 Mon Sep 17 00:00:00 2001 From: morris Date: Sat, 16 Mar 2013 07:41:09 -0700 Subject: [PATCH] 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 --- src/os_cpu/linux_x86/vm/os_linux_x86.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os_cpu/linux_x86/vm/os_linux_x86.cpp b/src/os_cpu/linux_x86/vm/os_linux_x86.cpp index 4c9d3dbed..5cdab45d4 100644 --- a/src/os_cpu/linux_x86/vm/os_linux_x86.cpp +++ b/src/os_cpu/linux_x86/vm/os_linux_x86.cpp @@ -340,7 +340,7 @@ JVM_handle_linux_signal(int sig, // 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(); } -- GitLab