From b15bc6bf1f5626e1efe088105a189540e3e3e8da Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Sun, 22 Oct 2023 10:07:52 -0700 Subject: [PATCH] Update config=sanitize and fuzz targets We used to need to silence float-divide-by-zero and float-cast-overflow sanitizers since clang used a finite valid floating point value range. Fortunately, since clang-9 UBSAN properly handles various primitive operations per IEEE-754 so we no longer need this workaround. Also use fork=16 mode for fuzz targets to make it easier to run fuzzing locally. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 58a28bf..41a92ae 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ ifeq ($(config),coverage) endif ifeq ($(config),sanitize) - CXXFLAGS+=-fsanitize=address,undefined -fno-sanitize=float-divide-by-zero,float-cast-overflow -fno-sanitize-recover=all + CXXFLAGS+=-fsanitize=address,undefined -fno-sanitize-recover=all LDFLAGS+=-fsanitize=address,undefined endif @@ -66,7 +66,7 @@ endif fuzz_%: $(BUILD)/fuzz_% @mkdir -p build/$@ - $< build/$@ tests/data_fuzz_$* -max_len=1024 -dict=tests/fuzz_$*.dict + $< build/$@ tests/data_fuzz_$* -max_len=1024 -dict=tests/fuzz_$*.dict -fork=16 clean: rm -rf $(BUILD)