0
0
mirror of https://github.com/zeux/pugixml.git synced 2024-12-25 20:14:10 +08:00

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.
This commit is contained in:
Arseny Kapoulkine 2023-10-22 10:07:52 -07:00
parent 33f709379a
commit b15bc6bf1f

View File

@ -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)