diff --git a/GNUmakefile b/GNUmakefile index 5ea424b5..946aa3c6 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -148,6 +148,19 @@ MDBX_BUILD_SOURCERY = $(shell set -o pipefail; $(MAKE) -s src/version.c && (open check: test dist +check-analyzer: + @echo "NOTE: There a lot of false-positive warnings at 2020-05-01 by pre-release GCC-10 (20200328, Red Hat 10.0.1-0.11)" + $(MAKE) --always-make CFLAGS_EXTRA="-Og -fanalyzer -Wno-error" build-test + +check-ubsan: + $(MAKE) clean && $(MAKE) CFLAGS_EXTRA="-Ofast -fsanitize=undefined -fsanitize-undefined-trap-on-error" check + +check-asan: + $(MAKE) clean && $(MAKE) CFLAGS_EXTRA="-Os -fsanitize=address" check + +check-leak: + $(MAKE) clean && $(MAKE) CFLAGS_EXTRA="-fsanitize=leak" check + build-test: all mdbx_example mdbx_test test: build-test diff --git a/Makefile b/Makefile index 66a5f50e..24c2f04f 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -all install mdbx tools strip clean test check dist test-singleprocess test-fault memcheck test-valgrind cross-gcc cross-qemu bench bench-quartet clean-bench reformat build-test: +all install mdbx tools strip clean test check dist test-singleprocess test-fault memcheck test-valgrind cross-gcc cross-qemu bench bench-quartet clean-bench reformat build-test check-analyzer check-ubsan check-asan check-leak: @CC=$(CC) \ CXX=`if test -n "$(CXX)" && which "$(CXX)" > /dev/null; then echo "$(CXX)"; elif test -n "$(CCC)" && which "$(CCC)" > /dev/null; then echo "$(CCC)"; else echo "c++"; fi` \ `which gmake || which gnumake || echo 'echo "GNU Make is required"; exit 2;'` \