asan/ubsan & valgrind

This commit is contained in:
2024-07-02 19:08:02 +00:00
parent b76ceb1b8e
commit 925672eed0

View File

@ -1,7 +1,5 @@
.PHONY: clean test .PHONY: clean test
WRAP := valgrind --track-origins=yes --leak-check=full --show-leak-kinds=all
ifeq (${DEBUG}, 1) ifeq (${DEBUG}, 1)
LFLAGS += --debug --trace LFLAGS += --debug --trace
CFLAGS += -O0 -ggdb -fno-inline CFLAGS += -O0 -ggdb -fno-inline
@ -10,6 +8,12 @@ else
CFLAGS += -O3 -flto=auto -fno-stack-protector CFLAGS += -O3 -flto=auto -fno-stack-protector
endif endif
ifeq ($(SAN), 1)
CFLAGS += -fsanitize=address,undefined
else
WRAP := valgrind --track-origins=yes --leak-check=full --show-leak-kinds=all
endif
CFLAGS += -Wall -Wextra -Wpedantic CFLAGS += -Wall -Wextra -Wpedantic
OUT := eaxhla OUT := eaxhla