diff options
author | Bryan Cantrill <bryan@joyent.com> | 2013-02-28 07:21:34 +0000 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2013-08-01 10:18:30 -0700 |
commit | 8f68126c6dc4f2178929233f0c7ccce877e973ca (patch) | |
tree | 4a645f31e0c4341544ac342d7ae4386876a9963f /usr/src/lib/libproc/common/Pzone.c | |
parent | a5b577712a34346841d970e0827b4920ace408af (diff) | |
download | illumos-joyent-8f68126c6dc4f2178929233f0c7ccce877e973ca.tar.gz |
3918 "pargs -l" dies on incomplete core dumps
3919 mdb/pmap should show unresolved map names on core dumps
3920 executable mapping in core dump misreported when file isn't found
3921 Pfindexec() finds wrong binary, wreaking havoc
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Eric Schrock <eric.schrock@delphix.com>
Approved by: Dan McDonald <danmcd@nexenta.com>
Diffstat (limited to 'usr/src/lib/libproc/common/Pzone.c')
-rw-r--r-- | usr/src/lib/libproc/common/Pzone.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr/src/lib/libproc/common/Pzone.c b/usr/src/lib/libproc/common/Pzone.c index c478b41624..68efea7a72 100644 --- a/usr/src/lib/libproc/common/Pzone.c +++ b/usr/src/lib/libproc/common/Pzone.c @@ -23,6 +23,9 @@ * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* + * Copyright (c) 2013, Joyent, Inc. All rights reserved. + */ #include <assert.h> #include <dlfcn.h> @@ -792,9 +795,10 @@ Pfindmap(struct ps_prochandle *P, map_info_t *mptr, char *s, size_t n) (strcmp(mptr->map_pmap.pr_mapname, "a.out") == 0) || ((fptr != NULL) && (fptr->file_lname != NULL) && (strcmp(fptr->file_lname, "a.out") == 0))) { - (void) Pexecname(P, buf, sizeof (buf)); - (void) strlcpy(s, buf, n); - return (s); + if (Pexecname(P, buf, sizeof (buf)) != NULL) { + (void) strlcpy(s, buf, n); + return (s); + } } /* Try /proc first to get the real object name */ |