Page MenuHomePhabricator

[backport#17113] tests: Add fuzzing harness for descriptor Span-parsing helpers
ClosedPublic

Authored by majcosta on Jul 9 2020, 20:18.

Details

Summary

58d67f1cc068c3779e309dc8a82ce33158c3e5b2 tests: Add fuzzing harness for descriptor Span-parsing helpers (practicalswift)

Pull request description:

Add fuzzing harness for descriptor Span-parsing helpers (`spanparsing`).

As suggested by a fuzz testing enthusiast in https://github.com/bitcoin/bitcoin/pull/16887#issuecomment-540655816.

**Testing this PR**

Run:

```
$ CC=clang CXX=clang++ ./configure --enable-fuzz \
      --with-sanitizers=address,fuzzer,undefined
$ make
$ src/test/fuzz/spanparsing
```

Depends on D6879

Backport of Core PR17113

Test Plan
cmake -GNinja .. -DENABLE_SANITIZERS="address;fuzzer" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
ninja bitcoin-fuzzers link-fuzz-test_runner.py

run ./src/test/fuzz/spanparsing for a few seconds