mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
native: add address sanitizer make target
This commit is contained in:
parent
5d18244b39
commit
8a33a62914
@ -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…
Reference in New Issue
Block a user