Great work on the sanitizers. I can't express how useful they are.
The Crypto++ project just promoted them to first class makefile
targets for internal testing.
For other who want to do the same, one can perform similar to the
following if using GNU Make (sorry, the Posix Make folks are out of
# Undefined Behavior Sanitzier (Clang and G++)
ifeq ($(findstring ubsan,$(MAKECMDGOALS)),ubsan)
CXXFLAGS += -fsanitize=undefined
endif # UBsan
# Address Sanitzier (Clang and G++)
ifeq ($(findstring asan,$(MAKECMDGOALS)),asan)
CXXFLAGS += -fsanitize=address
endif # Asan
Then, we provide a recipe for them:
asan ubsan: libcryptopp.a cryptest.exe