From e2cf2d257e160ee7feeb3d73fb02e941f7e865d0 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 24 Jul 2022 11:12:04 -0700 Subject: Add GCC sanitizer debugging. * Makefile (DIAG_FLAGS): Sanitize for memory misuse and undefined behavior. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b9d484f..3f7abdc 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ -DIAG_FLAGS ?= -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic +DIAG_FLAGS ?= -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic \ + -fsanitize=address -fsanitize=undefined OPT_FLAGS ?= -O2 CFLAGS ?= $(OPT_FLAGS) $(DIAG_FLAGS) -- cgit v1.2.3