fuzz: reset chainman after external block imports #36129

pull HowHsu wants to merge 1 commits into bitcoin:master from HowHsu:fuzz-reset-load-external-chainman changing 1 files +12 −2
  1. HowHsu commented at 1:45 PM on August 31, 2026: contributor

    LoadExternalBlockFile() may add headers to the block index even when full block validation fails. Reusing the static chainman therefore lets one fuzz input affect later inputs and makes all-corpus coverage order-dependent.

    Recreate the chainman after each processed input, disable unused network setup so PeerManager cannot retain a reference to it, and reseed the deterministic test RNG consumed by chainman initialization.

    Tested with run_deterministic_fuzz_coverage.sh load_external_block_file 20: all 930 corpus inputs passed both the individual-repeat and randomized all-corpus checks.

  2. fuzz: reset chainman after external block imports
    LoadExternalBlockFile may add headers to the block index even when
    full block validation fails. Reusing the static chainman lets one fuzz
    input affect later inputs and makes shuffled corpus coverage
    order-dependent.
    
    Recreate the chainman after each processed input to restore the genesis
    baseline. Disable unused network setup so PeerManager cannot retain a
    reference to the replaced chainman. Reseed the test RNG because
    chainman initialization consumes the global deterministic random state.
    0243779e73
  3. DrahtBot added the label Fuzzing on Aug 31, 2026
  4. DrahtBot commented at 1:45 PM on August 31, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/36129.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process. A summary of reviews will appear here.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

Contributors
Labels

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-08-31 18:51 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me