aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra/dlmalloc.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2018-08-23 11:23:00 -0400
committerDamjan Marion <dmarion@me.com>2018-08-23 20:00:08 +0000
commitb76590ac59764b02c6fcb85587cc53d492325a79 (patch)
tree22223882c4cbc0fc394c563778d3706095ec3bec /src/vppinfra/dlmalloc.c
parent3ea2d6c130e5aa97779881ae23441c47852a9aaf (diff)
clib_mem_is_heap_object() needs to recognize sys_alloc segments
Preferably without mistaking -pie (address randomized) segment addresses for heap objects. Change-Id: Idca6b966f14b1caf6b4637843fe407dbc5017535 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vppinfra/dlmalloc.c')
-rw-r--r--src/vppinfra/dlmalloc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vppinfra/dlmalloc.c b/src/vppinfra/dlmalloc.c
index 1b4d226a827..5316d41b6dc 100644
--- a/src/vppinfra/dlmalloc.c
+++ b/src/vppinfra/dlmalloc.c
@@ -4120,6 +4120,10 @@ int mspace_is_heap_object (mspace msp, void *p)
return 1;
this_seg = this_seg->next;
}
+
+ if (pp > ms->least_addr && pp <= ms->least_addr + ms->footprint)
+ return 1;
+
return 0;
}