add script to minimize corpus
This commit is contained in:
parent
ce52d9c685
commit
f21a39496d
|
@ -75,3 +75,10 @@ large fuzz targets. Call `b2` like this::
|
|||
|
||||
b2 clang stage-large -j$(nproc)
|
||||
|
||||
sharing corpora
|
||||
---------------
|
||||
|
||||
Before sharing your fuzz corpus, it should be minimized. There is a script
|
||||
called `minimize.sh` which moves `corpus` to `prev-corpus` and copies over
|
||||
a minimized set of inputs to a new `corpus` directory.
|
||||
|
||||
|
|
|
@ -468,3 +468,4 @@ fuzzers
|
|||
fuzzer
|
||||
libFuzzer
|
||||
clang's
|
||||
prev
|
||||
|
|
|
@ -76,6 +76,7 @@ local LARGE_TARGETS =
|
|||
resume_data
|
||||
file_storage_add_file
|
||||
sanitize_path
|
||||
upnp
|
||||
;
|
||||
|
||||
install stage : $(TARGETS) : <install-type>EXE <location>fuzzers ;
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
function minimize
|
||||
{
|
||||
mkdir corpus/${1}
|
||||
./fuzzers/${1} -artifact_prefix=./${1}- -merge=1 corpus/${1} prev-corpus/${1}
|
||||
}
|
||||
|
||||
mv corpus prev-corpus
|
||||
mkdir corpus
|
||||
|
||||
for file in fuzzers/*; do
|
||||
minimize $(basename $file) &
|
||||
done
|
||||
|
||||
wait
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
function run
|
||||
{
|
||||
|
@ -5,29 +6,8 @@ function run
|
|||
./fuzzers/${1} -max_total_time=172800 -timeout=10 -artifact_prefix=./${1}- corpus/${1}
|
||||
}
|
||||
|
||||
run torrent_info &
|
||||
run parse_magnet_uri &
|
||||
run bdecode_node &
|
||||
run lazy_bdecode &
|
||||
run parse_int &
|
||||
run sanitize_path &
|
||||
run escape_path &
|
||||
run file_storage_add_file &
|
||||
run base32decode &
|
||||
run base32encode &
|
||||
run base64encode &
|
||||
run escape_string e&
|
||||
run gzip &
|
||||
run verify_encoding &
|
||||
run convert_to_native &
|
||||
run convert_from_native &
|
||||
run utf8_wchar &
|
||||
run wchar_utf8 &
|
||||
run utf8_codepoint &
|
||||
run http_parser &
|
||||
run upnp &
|
||||
run dht_node &
|
||||
run utp &
|
||||
run resume_data &
|
||||
for file in fuzzers/*; do
|
||||
run $(basename $file) &
|
||||
done
|
||||
|
||||
wait
|
||||
|
|
Loading…
Reference in New Issue