aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-07-24 11:12:04 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-07-24 11:12:04 -0700
commite2cf2d257e160ee7feeb3d73fb02e941f7e865d0 (patch)
tree600e66ff0794d2f3eee8c26dc630077fb6424093 /Makefile
parent5d8b80236056e229105c158c5aca8ba34d73e468 (diff)
downloadsafepath-e2cf2d257e160ee7feeb3d73fb02e941f7e865d0.tar.gz
safepath-e2cf2d257e160ee7feeb3d73fb02e941f7e865d0.tar.bz2
safepath-e2cf2d257e160ee7feeb3d73fb02e941f7e865d0.zip
Add GCC sanitizer debugging.
* Makefile (DIAG_FLAGS): Sanitize for memory misuse and undefined behavior.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
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)