Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 May 2017 23:21:24 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r318687 - head/lib/libproc
Message-ID:  <201705222321.v4MNLOvm063810@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Mon May 22 23:21:24 2017
New Revision: 318687
URL: https://svnweb.freebsd.org/changeset/base/318687

Log:
  Ensure that the mappings table is populated in proc_objname().
  
  MFC after:	1 week
  Sponsored by:	Dell EMC Isilon

Modified:
  head/lib/libproc/proc_sym.c

Modified: head/lib/libproc/proc_sym.c
==============================================================================
--- head/lib/libproc/proc_sym.c	Mon May 22 23:17:55 2017	(r318686)
+++ head/lib/libproc/proc_sym.c	Mon May 22 23:21:24 2017	(r318687)
@@ -339,6 +339,9 @@ proc_objname(struct proc_handle *p, uint
 	prmap_t *map;
 	size_t i;
 
+	if (p->nmappings == 0)
+		if (proc_rdagent(p) == NULL)
+			return (NULL);
 	for (i = 0; i < p->nmappings; i++) {
 		map = &p->mappings[i].map;
 		if (addr >= map->pr_vaddr &&



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705222321.v4MNLOvm063810>