8008560: [parfait] Null pointer deference in hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp

Thu, 14 Mar 2013 07:44:18 -0700

author
morris
date
Thu, 14 Mar 2013 07:44:18 -0700
changeset 4731
71f13276159d
parent 4730
b7c2c5b2572c
child 4732
fba788946616
child 4758
a40807924950

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

src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp	Wed Feb 13 10:25:09 2013 +0100
     1.2 +++ b/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp	Thu Mar 14 07:44:18 2013 -0700
     1.3 @@ -516,7 +516,7 @@
     1.4          // here if the underlying file has been truncated.
     1.5          // Do not crash the VM in such a case.
     1.6          CodeBlob* cb = CodeCache::find_blob_unsafe(pc);
     1.7 -        nmethod* nm = cb->is_nmethod() ? (nmethod*)cb : NULL;
     1.8 +        nmethod* nm = (cb != NULL && cb->is_nmethod()) ? (nmethod*)cb : NULL;
     1.9          if (nm != NULL && nm->has_unsafe_access()) {
    1.10            stub = StubRoutines::handler_for_unsafe_access();
    1.11          }

mercurial