mirror of
https://github.com/zeux/pugixml.git
synced 2024-12-26 12:41:06 +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:
parent
33f709379a
commit
b15bc6bf1f
4
Makefile
4
Makefile
@ -27,7 +27,7 @@ ifeq ($(config),coverage)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(config),sanitize)
|
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
|
LDFLAGS+=-fsanitize=address,undefined
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ endif
|
|||||||
|
|
||||||
fuzz_%: $(BUILD)/fuzz_%
|
fuzz_%: $(BUILD)/fuzz_%
|
||||||
@mkdir -p build/$@
|
@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:
|
clean:
|
||||||
rm -rf $(BUILD)
|
rm -rf $(BUILD)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user