cargo fuzz integration (#306)

* added wip translate_module fuzzer

* use local binaryen-rs fork (with shim) for fuzzing

* minor doc cleanup

* check fuzzer integration via CI

* switch back to upstream binaryen-rs; add forgotten integration test directive
This commit is contained in:
Jonathan Foote
2018-05-14 15:31:27 -04:00
committed by Dan Gohman
parent 07c65bab11
commit 1924039713
5 changed files with 68 additions and 0 deletions

View File

@@ -65,4 +65,19 @@ else
echo "\`cargo +nightly install clippy\` for optional rust linting"
fi
# Ensure fuzzer works by running it with a single input
# Note LSAN is disabled due to https://github.com/google/sanitizers/issues/764
banner "cargo fuzz check"
if rustup toolchain list | grep -q nightly; then
if cargo install --list | grep -q cargo-fuzz; then
echo "cargo-fuzz found"
else
echo "installing cargo-fuzz"
cargo +nightly install cargo-fuzz
fi
ASAN_OPTIONS=detect_leaks=0 cargo +nightly fuzz run fuzz_translate_module $topdir/fuzz/corpus/fuzz_translate_module/ffaefab69523eb11935a9b420d58826c8ea65c4c
else
echo "nightly toolchain not found, skipping fuzz target integration test"
fi
banner "OK"