diff --git a/makefile b/makefile index e74ad31..fde7775 100644 --- a/makefile +++ b/makefile @@ -130,11 +130,11 @@ else ifeq ($(MEMCHK),1) #use asan to check memory leaks/invalid accesses LDFLAGS+=-fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls - COMPILER_FLAGS+=-fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls -DOUR_DICK_DISABLE_NOTHROW_ALLOCATE + COMPILER_FLAGS+=-fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls -DOUR_DICK_DISABLE_NOTHROW_ALLOCATE -DENABLE_MEMCHK=1 endif ifeq ($(UNDEFCHK),1) LDFLAGS+=-fsanitize=undefined - COMPILER_FLAGS+=-fsanitize=undefined + COMPILER_FLAGS+=-fsanitize=undefined -DENABLE_UNDEFCHK=1 endif endif diff --git a/src/nothrow_allocation.cpp b/src/nothrow_allocation.cpp index 936dfd6..8522d9c 100644 --- a/src/nothrow_allocation.cpp +++ b/src/nothrow_allocation.cpp @@ -20,7 +20,7 @@ #include //malloc, free #include -#ifndef OUR_DICK_DISABLE_NOTHROW_ALLOCATE +#ifndef ENABLE_MEMCHK void* operator new(size_t newsize){ return std::malloc(newsize); }