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 &&
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to