|
12 | 12 | import subprocess
|
13 | 13 | import logging
|
14 | 14 |
|
| 15 | +# Fuzzers known to lack a seed corpus in https://github.com/bitcoin-core/qa-assets/tree/master/fuzz_seed_corpus |
| 16 | +FUZZERS_MISSING_CORPORA = [ |
| 17 | + "addr_info_deserialize", |
| 18 | + "block_file_info_deserialize", |
| 19 | + "block_filter_deserialize", |
| 20 | + "block_header_and_short_txids_deserialize", |
| 21 | + "fee_rate_deserialize", |
| 22 | + "flat_file_pos_deserialize", |
| 23 | + "key_origin_info_deserialize", |
| 24 | + "merkle_block_deserialize", |
| 25 | + "mutable_transaction_deserialize", |
| 26 | + "out_point_deserialize", |
| 27 | + "partial_merkle_tree_deserialize", |
| 28 | + "partially_signed_transaction_deserialize", |
| 29 | + "prefilled_transaction_deserialize", |
| 30 | + "psbt_input_deserialize", |
| 31 | + "psbt_output_deserialize", |
| 32 | + "pub_key_deserialize", |
| 33 | + "script_deserialize", |
| 34 | + "sub_net_deserialize", |
| 35 | + "tx_in_deserialize", |
| 36 | +] |
15 | 37 |
|
16 | 38 | def main():
|
17 | 39 | parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
@@ -100,10 +122,14 @@ def main():
|
100 | 122 |
|
101 | 123 | def run_once(*, corpus, test_list, build_dir, export_coverage):
|
102 | 124 | for t in test_list:
|
| 125 | + corpus_path = os.path.join(corpus, t) |
| 126 | + if t in FUZZERS_MISSING_CORPORA: |
| 127 | + os.makedirs(corpus_path, exist_ok=True) |
103 | 128 | args = [
|
104 | 129 | os.path.join(build_dir, 'src', 'test', 'fuzz', t),
|
105 | 130 | '-runs=1',
|
106 |
| - os.path.join(corpus, t), |
| 131 | + '-detect_leaks=0', |
| 132 | + corpus_path, |
107 | 133 | ]
|
108 | 134 | logging.debug('Run {} with args {}'.format(t, args))
|
109 | 135 | result = subprocess.run(args, stderr=subprocess.PIPE, universal_newlines=True)
|
|
0 commit comments