hotspot/agent/src/os/linux/ps_core.c
changeset 5341 290a02b4adb3
parent 2105 347008ce7984
child 5547 f4b087cbb361
--- a/hotspot/agent/src/os/linux/ps_core.c	Mon Apr 19 02:13:06 2010 -0700
+++ b/hotspot/agent/src/os/linux/ps_core.c	Tue Apr 20 13:26:33 2010 -0700
@@ -884,9 +884,12 @@
       }
 
       // read name of the shared object
-      if (read_string(ph, (uintptr_t) lib_name_addr, lib_name, sizeof(lib_name)) != true) {
+      lib_name[0] = '\0';
+      if (lib_name_addr != 0 &&
+          read_string(ph, (uintptr_t) lib_name_addr, lib_name, sizeof(lib_name)) != true) {
          print_debug("can't read shared object name\n");
-         return false;
+         // don't let failure to read the name stop opening the file.  If something is really wrong
+         // it will fail later.
       }
 
       if (lib_name[0] != '\0') {