Page MenuHomePhabricator

[backport#17051] tests: Add deserialization fuzzing harnesses
ClosedPublic

Authored by majcosta on Jul 15 2020, 20:57.

Details

Summary

897849d8c225045f0dd3a2fe99b5d69bdf84b4e2 tests: Add deserialization fuzzing harnesses (practicalswift)
16f0a186dcee563bb1000e1ffc51da87e7623bc6 tests: Add corpora suppression (FUZZERS_MISSING_CORPORA) for fuzzers missing in https://github.com/bitcoin-core/qa-assets/tree/master/fuzz_seed_corpus (practicalswift)

Pull request description:

Add deserialization fuzzing harnesses.

**Testing this PR**

Run:

```
$ CC=clang CXX=clang++ ./configure --enable-fuzz --with-sanitizers=address,fuzzer,undefined
$ make
$ contrib/devtools/test_fuzzing_harnesses.sh 'addr_info|block_file_info|block_filter|block_header|ext_key|ext_pub_key|fee_rate|flat_file|key_origin|merkle_block|mutable_transaction|out_point|partial_merkle_tree|partially_signed_transaction|prefilled_transaction|psbt_input|psbt_output|pub_key|script_deserialize|sub_net|tx_in' 10
```

`test_fuzzing_harnesses.sh` can be found in PR #17000.

Depends on D6945

Backport of Core PR17051

Test Plan
cmake -GNinja .. -DENABLE_SANITIZERS="address;fuzzer;undefined" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
ninja bitcoin-fuzzers link-fuzz-test_runner.py
./test/fuzz/test_runner.py -l DEBUG <path_to_corpus>

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

Fabien requested changes to this revision.Jul 16 2020, 06:47
Fabien added a subscriber: Fabien.
Fabien added inline comments.
test/fuzz/test_runner.py
16 ↗(On Diff #22295)

https://github.com/Bitcoin-ABC/qa-assets/tree/master/fuzz_seed_corpus
This whole section might be irrelevant, it looks like we have some seeds

This revision now requires changes to proceed.Jul 16 2020, 06:47

set the list of fuzzers missing corpus data to empty

Fabien added inline comments.
test/fuzz/test_runner.py
16 ↗(On Diff #22310)

Update the link

This revision is now accepted and ready to land.Jul 17 2020, 07:00