@@ -13,10 +13,19 @@ rm *_target.rs
1313[ " $( git diff) " != " " ] && exit 1
1414popd
1515
16+ export RUSTFLAGS=" --cfg=secp256k1_fuzz --cfg=hashes_fuzz"
17+
18+ mkdir -p hfuzz_workspace/full_stack_target/input
19+ pushd write-seeds
20+ RUSTFLAGS=" $RUSTFLAGS --cfg=fuzzing" cargo run ../hfuzz_workspace/full_stack_target/input
21+ popd
22+
1623cargo install --color always --force honggfuzz --no-default-features
24+ # Because we're fuzzing relatively few iterations, the maximum possible
25+ # compiler optimizations aren't necessary, so switch to defaults.
1726sed -i ' s/lto = true//' Cargo.toml
27+ sed -i ' s/codegen-units = 1//' Cargo.toml
1828
19- export RUSTFLAGS=" --cfg=secp256k1_fuzz --cfg=hashes_fuzz"
2029export HFUZZ_BUILD_ARGS=" --features honggfuzz_fuzz"
2130
2231cargo --color always hfuzz build
@@ -25,11 +34,13 @@ for TARGET in src/bin/*.rs; do
2534 FILE=" ${FILENAME% .* } "
2635 HFUZZ_RUN_ARGS=" --exit_upon_crash -v -n2"
2736 if [ " $FILE " = " chanmon_consistency_target" ]; then
28- HFUZZ_RUN_ARGS=" $HFUZZ_RUN_ARGS -F 64 -N100000"
29- elif [ " $FILE " = " full_stack_target" ]; then
30- HFUZZ_RUN_ARGS=" $HFUZZ_RUN_ARGS -t0 -N1000000"
37+ HFUZZ_RUN_ARGS=" $HFUZZ_RUN_ARGS -F 64 -N5000"
38+ elif [ " $FILE " = " process_network_graph_target" -o " $FILE " = " full_stack_target" -o " $FILE " = " router_target" ]; then
39+ HFUZZ_RUN_ARGS=" $HFUZZ_RUN_ARGS -N50000"
40+ elif [ " $FILE " = " indexedmap_target" ]; then
41+ HFUZZ_RUN_ARGS=" $HFUZZ_RUN_ARGS -N500000"
3142 else
32- HFUZZ_RUN_ARGS=" $HFUZZ_RUN_ARGS -N1000000 "
43+ HFUZZ_RUN_ARGS=" $HFUZZ_RUN_ARGS -N2500000 "
3344 fi
3445 export HFUZZ_RUN_ARGS
3546 cargo --color always hfuzz run $FILE
0 commit comments