From 3573cf337617263cb49cc02ca378292e53ab2ed2 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Mon, 22 May 2017 23:21:24 +0000 Subject: [PATCH] Ensure that the mappings table is populated in proc_objname(). MFC after: 1 week Sponsored by: Dell EMC Isilon --- lib/libproc/proc_sym.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/libproc/proc_sym.c b/lib/libproc/proc_sym.c index a3c5e554a347..da6c150e2a40 100644 --- a/lib/libproc/proc_sym.c +++ b/lib/libproc/proc_sym.c @@ -339,6 +339,9 @@ proc_objname(struct proc_handle *p, uintptr_t addr, char *objname, 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 &&