diff options
author | Wei CHEN <weichen@astri.org> | 2019-04-09 12:38:40 +0800 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2019-06-18 18:44:11 +0000 |
commit | 822dadf4788e2e6d7cf0b3ec22ebc99f81859f67 (patch) | |
tree | 5bbfb7e869de9c4eadddb8e9025e570ffc85820d | |
parent | ae945592b299b14b8d293b4c77b7d851a4f8ea11 (diff) |
vppinfra: dlmalloc records wrong offset for tracing
Fix a bug that mheap_get_trace is called with the wrong pointer when
mspace_get_aligned allocates a chunk with alignment greater than 16
but less than 4k.
Type: fix
Change-Id: Ic3b91fc9532248482662f019bbfa073da18645ed
Signed-off-by: Wei CHEN <weichen@astri.org>
(cherry picked from commit 5e282e93ad9f961d332cac9a033be33542979848)
-rw-r--r-- | src/vppinfra/dlmalloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vppinfra/dlmalloc.c b/src/vppinfra/dlmalloc.c index 37721bb15fd..2a40eeb7f5b 100644 --- a/src/vppinfra/dlmalloc.c +++ b/src/vppinfra/dlmalloc.c @@ -4259,7 +4259,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; } |