Merge pull request #3327 from authmillenon/native/enh/address-sanitizer

native: add address sanitizer make target
dev/timer
Peter Kietzmann 8 years ago
commit f95aaa6bf6

@ -90,6 +90,9 @@ all-debug: export CFLAGS += -g
all-cachegrind: export CFLAGS += -g
all-gprof: export CFLAGS += -pg
all-gprof: export LINKFLAGS += -pg
all-asan: export CFLAGS += -fsanitize=address -fno-omit-frame-pointer -g
all-asan: export CFLAGS += -DNATIVE_IN_CALLOC
all-asan: export LINKFLAGS += -fsanitize=address -fno-omit-frame-pointer -g
export INCLUDES += $(NATIVEINCLUDES)
@ -121,6 +124,8 @@ all-debug: all
all-gprof: all
all-asan: all
all-valgrind: all
all-cachegrind: all

@ -149,7 +149,11 @@ void free(void *ptr)
_native_syscall_leave();
}
#ifdef NATIVE_IN_CALLOC
int _native_in_calloc = 1;
#else
int _native_in_calloc = 0;
#endif
void *calloc(size_t nmemb, size_t size)
{
/* dynamically load calloc when it's needed - this is necessary to

Loading…
Cancel
Save