aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2019-12-02 17:42:56 +0100
committerDamjan Marion <dmarion@me.com>2019-12-17 18:09:48 +0000
commit497dd89432e96d0daba90db9468e630cb469b01a (patch)
tree56a5a678cdc13d5d6c4bf08925e459c002685628 /src/vppinfra
parentdea0b23fa73fe3d53b8f3b004f7b8a2a8456d7f7 (diff)
misc: address sanitizer: do not instrument dlmalloc internals
Type: fix Change-Id: I2b8273666db864d80012c39623ae866ac3527426 Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/vppinfra')
-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 13f0dff8203..23b4dfcac44 100644
--- a/src/vppinfra/dlmalloc.c
+++ b/src/vppinfra/dlmalloc.c
@@ -2493,6 +2493,7 @@ static mchunkptr mmap_resize(mstate m, mchunkptr oldp, size_t nb, int flags) {
/* -------------------------- mspace management -------------------------- */
/* Initialize top chunk and its size */
+CLIB_NOSANITIZE_ADDR
static void init_top(mstate m, mchunkptr p, size_t psize) {
/* Ensure alignment */
size_t offset = align_offset(chunk2mem(p));
@@ -2537,6 +2538,7 @@ static void reset_on_error(mstate m) {
#endif /* PROCEED_ON_ERROR */
/* Allocate chunk and prepend remainder with chunk in successor base. */
+CLIB_NOSANITIZE_ADDR
static void* prepend_alloc(mstate m, char* newbase, char* oldbase,
size_t nb) {
mchunkptr p = align_as_chunk(newbase);
@@ -2579,6 +2581,7 @@ static void* prepend_alloc(mstate m, char* newbase, char* oldbase,
}
/* Add a segment to hold a new noncontiguous region */
+CLIB_NOSANITIZE_ADDR
static void add_segment(mstate m, char* tbase, size_t tsize, flag_t mmapped) {
/* Determine locations and sizes of segment, fenceposts, old top */
char* old_top = (char*)m->top;
@@ -2634,6 +2637,7 @@ static void add_segment(mstate m, char* tbase, size_t tsize, flag_t mmapped) {
/* -------------------------- System allocation -------------------------- */
/* Get memory from system using MORECORE or MMAP */
+CLIB_NOSANITIZE_ADDR
static void* sys_alloc(mstate m, size_t nb) {
char* tbase = CMFAIL;
size_t tsize = 0;