fuzz: reset connman state in p2p targets #35808

pull HowHsu wants to merge 1 commits into bitcoin:master from HowHsu:fuzz-connman changing 2 files +2 −0
  1. HowHsu commented at 11:23 AM on July 26, 2026: contributor

    Resets ConnmanTestMsg after StopNodes() in cmpctblock and p2p_handshake, matching the other reused-connman fuzz targets and preventing sticky CConnman state from leaking between corpus inputs.

    Before this, deterministic-fuzz-coverage showed single inputs were stable, but all-input directory runs were not:

    cmpctblock, src/net.cpp:4172
    - Branch (4172:9): [True: 1.21k, False: 33.0k]
    + Branch (4172:9): [True: 613, False: 33.6k]
    - Branch (4172:72): [True: 901, False: 311]
    + Branch (4172:72): [True: 497, False: 116]
    
    p2p_handshake, src/net.cpp:4172
    - Branch (4172:9): [True: 98, False: 1.67k]
    + Branch (4172:9): [True: 743, False: 1.03k]
    - Branch (4172:72): [True: 90, False: 8]
    + Branch (4172:72): [True: 612, False: 131]
    

    After the cmpctblock reset, deterministic-fuzz-coverage ... cmpctblock 8 passed.

  2. fuzz: reset connman state in p2p targets
    Clear ConnmanTestMsg state after stopping test nodes in cmpctblock and
    p2p_handshake so sticky CConnman state does not leak between fuzz inputs.
    fd403f9474
  3. DrahtBot added the label Fuzzing on Jul 26, 2026
  4. DrahtBot commented at 11:23 AM on July 26, 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/35808.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    Concept ACK nervana21

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. in src/test/fuzz/p2p_handshake.cpp:109 in fd403f9474
     105 | @@ -106,4 +106,5 @@ FUZZ_TARGET(p2p_handshake, .init = ::initialize)
     106 |      }
     107 |  
     108 |      node.connman->StopNodes();
     109 | +    connman.Reset();
    


    nervana21 commented at 6:26 PM on August 8, 2026:

    fd403f947432067678a9d5e866d06df3e59ad0e1: fuzz: reset connman state in p2p targets

    All other fuzz callers of connman.Reset() are at the start of the input (process_message.cpp, process_messages.cpp, p2p_private_broadcast.cpp).

    Is there a good reason to abandon that pattern here? If not, I'd prefer moving this Reset call to the start of the harness to stay consistent with the rest of the codebase.

  6. nervana21 commented at 6:26 PM on August 8, 2026: contributor

    Concept ACK

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-12 03:51 UTC

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