Merge rust-bitcoin/rust-bitcoin#1219: Revert "Temporarily disable fuzzing"
d25aba8ca0
fuzz: use travis-fuzz.sh in CI (Andrew Poelstra)407cbca111
fuzz: remove mysteriously-not-necessary quotes from gh action script (Andrew Poelstra)0a32525862
fuzz: disable features in honggfuzz (Andrew Poelstra)c7910f4561
Revert "Temporarily disable fuzzing" (Andrew Poelstra) Pull request description: This reverts commit720ea29865
. There is a new version of honggfuzz out. Maybe things work now. ACKs for top commit: sanket1729: utACKd25aba8ca0
tcharding: ACKd25aba8ca0
Tree-SHA512: d9d5cb89e5bcacfdd84bf293267ee558cffed4454908add9b6c4a172d3d06404564d1bb8c3f59f29a621369b901a9cdf31b8229b299320ac061f378a73bfa80c
This commit is contained in:
commit
24b9b419e5
|
@ -1,15 +1,12 @@
|
||||||
name: Fuzz
|
name: Fuzz
|
||||||
|
|
||||||
# Temporarily disable job until someone works out how to fix honggfuzz.
|
on: [push, pull_request]
|
||||||
on: []
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
fuzz:
|
fuzz:
|
||||||
if: ${{ !github.event.act }}
|
if: ${{ !github.event.act }}
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
env:
|
|
||||||
HFUZZ_BUILD_ARGS: "--features honggfuzz_fuzz"
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -31,11 +28,8 @@ jobs:
|
||||||
toolchain: 1.58
|
toolchain: 1.58
|
||||||
override: true
|
override: true
|
||||||
profile: minimal
|
profile: minimal
|
||||||
- run: cargo install honggfuzz
|
|
||||||
if: steps.cache-fuzz.outputs.cache-hit != 'true'
|
|
||||||
- run: echo "HFUZZ_RUN_ARGS=\"--run_time 30 --exit_upon_crash -v -f hfuzz_input/${{ matrix.fuzz_target }}/input\"" >> $GITHUB_ENV
|
|
||||||
- name: fuzz
|
- name: fuzz
|
||||||
run: cd fuzz && cargo hfuzz run ${{ matrix.fuzz_target }}
|
run: cd fuzz && ./travis-fuzz.sh "${{ matrix.fuzz_target }}"
|
||||||
- run: echo "${{ matrix.fuzz_target }}.rs" >executed_${{ matrix.fuzz_target }}
|
- run: echo "${{ matrix.fuzz_target }}.rs" >executed_${{ matrix.fuzz_target }}
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -12,7 +12,7 @@ afl_fuzz = ["afl"]
|
||||||
honggfuzz_fuzz = ["honggfuzz"]
|
honggfuzz_fuzz = ["honggfuzz"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
honggfuzz = { version = "0.5", optional = true }
|
honggfuzz = { version = "0.5", optional = true, default-features = false }
|
||||||
afl = { version = "0.4", optional = true }
|
afl = { version = "0.4", optional = true }
|
||||||
bitcoin = { path = ".." }
|
bitcoin = { path = ".." }
|
||||||
|
|
||||||
|
|
|
@ -8,9 +8,19 @@ if [ ${incorrectFilenames} -gt 0 ]; then
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$1" == "" ]; then
|
||||||
|
TARGETS=fuzz_targets/*
|
||||||
|
else
|
||||||
|
TARGETS=fuzz_targets/"$1".rs
|
||||||
|
fi
|
||||||
|
|
||||||
|
cargo --version
|
||||||
|
rustc --version
|
||||||
|
|
||||||
# Testing
|
# Testing
|
||||||
cargo install --force honggfuzz
|
cargo install --force honggfuzz --no-default-features
|
||||||
for TARGET in fuzz_targets/*; do
|
for TARGET in $TARGETS; do
|
||||||
|
echo "Fuzzing target $TARGET"
|
||||||
FILENAME=$(basename $TARGET)
|
FILENAME=$(basename $TARGET)
|
||||||
FILE="${FILENAME%.*}"
|
FILE="${FILENAME%.*}"
|
||||||
if [ -d hfuzz_input/$FILE ]; then
|
if [ -d hfuzz_input/$FILE ]; then
|
||||||
|
|
Loading…
Reference in New Issue