summaryrefslogtreecommitdiffstats
path: root/src/vppinfra/mem_dlmalloc.c
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2019-12-16 15:37:28 +0100
committerDamjan Marion <dmarion@me.com>2019-12-17 17:58:47 +0000
commitb2f09146c957f87edd431e75a24f8a456d539a02 (patch)
treec2d5701a7d1c88802972845d11588e3ddeff5547 /src/vppinfra/mem_dlmalloc.c
parent8d27fa73f22803d518993090804724f76350cfcc (diff)
misc: address sanitizer: fix instrumentation
Type: fix Change-Id: I99e3951f8cfb7ab9d2f0a7dcee92199eab29043c Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/vppinfra/mem_dlmalloc.c')
-rw-r--r--src/vppinfra/mem_dlmalloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vppinfra/mem_dlmalloc.c b/src/vppinfra/mem_dlmalloc.c
index 5628e2714c7..68901a5530a 100644
--- a/src/vppinfra/mem_dlmalloc.c
+++ b/src/vppinfra/mem_dlmalloc.c
@@ -215,12 +215,13 @@ clib_mem_init (void *memory, uword memory_size)
else
heap = create_mspace (memory_size, 1 /* locked */ );
+ CLIB_MEM_POISON (mspace_least_addr (heap), mspace_footprint (heap));
+
clib_mem_set_heap (heap);
if (mheap_trace_main.lock == 0)
clib_spinlock_init (&mheap_trace_main.lock);
- CLIB_MEM_POISON (mspace_least_addr (heap), mspace_footprint (heap));
return heap;
}