8010144: [parfait] Null pointer deference in hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp

Sat, 16 Mar 2013 07:41:09 -0700

author
morris
date
Sat, 16 Mar 2013 07:41:09 -0700
changeset 4763
9ef47379df20
parent 4762
0a2deac0bbfb
child 4765
592f9722c72e

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 file | annotate | diff | comparison | revisions
     1.1 --- a/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	Sat Mar 16 07:40:36 2013 -0700
     1.2 +++ b/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	Sat Mar 16 07:41:09 2013 -0700
     1.3 @@ -340,7 +340,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