From 3a0e5fd7753475087cefec92c1ef155a23312273 Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Wed, 11 May 2022 21:49:57 +0200 Subject: [PATCH] tests/unittests: enable address sanitizer for native --- tests/unittests/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/unittests/Makefile b/tests/unittests/Makefile index 8fbe901739..ea1caca504 100644 --- a/tests/unittests/Makefile +++ b/tests/unittests/Makefile @@ -28,6 +28,13 @@ INCLUDES += -I$(RIOTBASE)/tests/unittests/common # some tests need more stack CFLAGS += -DTHREAD_STACKSIZE_MAIN=THREAD_STACKSIZE_LARGE +# for these boards, enable asan (Address Sanitizer) +ASAN_BOARDS ?= native +ifneq (, $(filter $(BOARD), $(ASAN_BOARDS))) + CFLAGS += $(CFLAGS_ASAN) + LINKFLAGS += $(LINKFLAGS_ASAN) +endif + include $(RIOTBASE)/Makefile.include .PHONY: $(UNIT_TESTS)