From: Dave Barach Date: Thu, 23 Aug 2018 15:23:00 +0000 (-0400) Subject: clib_mem_is_heap_object() needs to recognize sys_alloc segments X-Git-Tag: v18.10-rc1~379 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=b76590ac59764b02c6fcb85587cc53d492325a79;hp=3ea2d6c130e5aa97779881ae23441c47852a9aaf;p=vpp.git 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 --- 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; }