Mercurial > hg > truffle
diff agent/src/os/linux/ps_core.c @ 1385:bc32f286fae0
6945219: minor SA fixes
Reviewed-by: twisti
author | never |
---|---|
date | Tue, 20 Apr 2010 13:26:33 -0700 |
parents | 0fbdb4381b99 |
children | c18cbe5936b8 |
line wrap: on
line diff
--- a/agent/src/os/linux/ps_core.c Mon Apr 19 02:13:06 2010 -0700 +++ b/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') {