changeset 5732:f0769f0382d7

8049684: pstack crashes on java core dump Reviewed-by: sundar, sspitsyn
author kevinw
date Mon, 21 Jul 2014 10:40:50 +0100
parents 5fd0a42e71aa
children e47086077559
files src/os/bsd/dtrace/libjvm_db.c src/os/solaris/dtrace/libjvm_db.c
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/os/bsd/dtrace/libjvm_db.c	Tue Sep 09 11:57:57 2014 -0700
+++ b/src/os/bsd/dtrace/libjvm_db.c	Mon Jul 21 10:40:50 2014 +0100
@@ -261,6 +261,9 @@
   uint64_t base;
   int err;
 
+  /* Clear *vmp now in case we jump to fail: */
+  memset(vmp, 0, sizeof(VMStructEntry));
+
   err = ps_pglobal_lookup(J->P, LIBJVM_SO, "gHotSpotVMStructs", &sym_addr);
   CHECK_FAIL(err);
   err = read_pointer(J, sym_addr, &gHotSpotVMStructs);
--- a/src/os/solaris/dtrace/libjvm_db.c	Tue Sep 09 11:57:57 2014 -0700
+++ b/src/os/solaris/dtrace/libjvm_db.c	Mon Jul 21 10:40:50 2014 +0100
@@ -261,6 +261,9 @@
   uint64_t base;
   int err;
 
+  /* Clear *vmp now in case we jump to fail: */
+  memset(vmp, 0, sizeof(VMStructEntry));
+
   err = ps_pglobal_lookup(J->P, LIBJVM_SO, "gHotSpotVMStructs", &sym_addr);
   CHECK_FAIL(err);
   err = read_pointer(J, sym_addr, &gHotSpotVMStructs);