Commit Graph

2 Commits

Author SHA1 Message Date
Vadim Zeitlin
b5aaede7b1 Add a helper for running fuzz function with a single input
This is useful when not using libFuzzer (e.g. because the compiler is
gcc or MSVC and not clang) as it allows to debug the problems found by
libFuzzer with the reproducers generated by it.
2017-10-28 15:12:14 +02:00
Vadim Zeitlin
d5a6568b21 Add a fuzzer for ZIP reading code
The new source file needs to be compiled with a recent clang using
libfuzzer using a command line similar to the following:

	$ clang++ -g -fsanitize=address -fsanitize-coverage=trace-pc-guard tests/fuzz/readzip.cpp `wx-config --cxxflags --libs base` -lFuzzer

and then executed passing it the corpus directory as parameter:

	$ ./a.out tests/fuzz/corpus/zip

This will be useful for finding more bugs like #17947 (and, indeed,
running it locally already found another assert failure, which will be
fixed soon).
2017-10-25 00:38:52 +02:00