vppinfra: fix the issue that mheap_get_trace record wrong pointer 55/18755/2
authorWei CHEN <weichen@astri.org>
Tue, 9 Apr 2019 04:38:40 +0000 (12:38 +0800)
committerDave Barach <openvpp@barachs.net>
Thu, 11 Apr 2019 12:11:47 +0000 (12:11 +0000)
when mspace_get_aligned try to malloc a chunk with align greater than 16

Change-Id: Ic3b91fc9532248482662f019bbfa073da18645ed
Signed-off-by: Wei CHEN <weichen@astri.org>
src/vppinfra/dlmalloc.c

index 9ed1e04..53caa3f 100644 (file)
@@ -4250,7 +4250,7 @@ void* mspace_get_aligned (mspace msp,
   if (use_trace(ms)) {
     mchunkptr p  = mem2chunk(rv);
     size_t psize = chunksize(p);
-    mheap_get_trace ((unsigned long)rv, psize);
+    mheap_get_trace (searchp, psize);
   }
   return (void *) searchp;
 }