summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2021-05-08 16:26:16 +0200
committerStefan Behnel <stefan_ml@behnel.de>2021-05-08 16:26:16 +0200
commit37eae21e132241e67d05776447d7394c153e82f0 (patch)
treedaacfcd24e2bfd9360d85cf0b40cf473192bea8d
parentb3b09fcd1962409c2f7867fcadd636c38579b81d (diff)
downloadpython-lxml-37eae21e132241e67d05776447d7394c153e82f0.tar.gz
Add a "make fuzz" target to run the fuzzer test.
-rw-r--r--Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 94426075..2b5f386d 100644
--- a/Makefile
+++ b/Makefile
@@ -98,6 +98,15 @@ valgrind_test_inplace: inplace
valgrind --tool=memcheck --leak-check=full --num-callers=30 --suppressions=valgrind-python.supp \
$(PYTHON) test.py
+fuzz: clean
+ $(MAKE) \
+ CC="/usr/bin/clang" \
+ CFLAGS="$$CFLAGS -fsanitize=fuzzer-no-link -g2" \
+ CXX="/usr/bin/clang++" \
+ CXXFLAGS="-fsanitize=fuzzer-no-link" \
+ inplace3
+ $(PYTHON3) src/lxml/tests/fuzz_xml_parse.py
+
gdb_test_inplace: inplace
@echo "file $(PYTHON)\nrun test.py" > .gdb.command
gdb -x .gdb.command -d src -d src/lxml