Use ASan and UBSan in debug builds.
authorJason S. Ninneman <jsn@mbar.us>
Sat, 15 Jul 2017 03:19:54 +0000 (20:19 -0700)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 17 Jul 2017 17:56:52 +0000 (13:56 -0400)
Makefile

index a3535321be7aa31d4f0bdd3a630c007c44ea1058..ed13d890f47ef9d5251dc1c8448c9e0b918dbf42 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -117,7 +117,12 @@ linty: CCFLAGS += -Winit-self
 linty: CCFLAGS += -Wpointer-arith
 linty: advent cheat
 
-debug: CCFLAGS += -O0 --coverage -ggdb -U_FORTIFY_SOURCE
+debug: CCFLAGS += -O0
+debug: CCFLAGS += --coverage
+debug: CCFLAGS += -ggdb
+debug: CCFLAGS += -U_FORTIFY_SOURCE
+debug: CCFLAGS += -fsanitize=address
+debug: CCFLAGS += -fsanitize=undefined
 debug: linty
 
 CSUPPRESSIONS = --suppress=missingIncludeSystem --suppress=invalidscanf