fuzz: apply node context reset pattern to p2p_handshake #35141

pull frankomosh wants to merge 1 commits into bitcoin:master from frankomosh:fuzz-p2p-handshake-node-context changing 1 files +18 −19
  1. frankomosh commented at 4:28 PM on April 22, 2026: contributor

    Follow-up to #34302. Applies the node context reset pattern from fabf8d1 to p2p_handshake.

    Previous code pattern created local AddrMan and node::Warnings objects, and passed them to PeerManager::make. connman was left holding a dangling reference_wrapper<AddrMan> across iterations, since the local objects destruct at iteration end while connman is global.

    Like in fabf8d1 , reset and reinstall node.addrman and node.peerman on each iteration. This PR also removes includes made unused by this or prior refactors.

  2. fuzz: apply node context reset pattern to p2p_handshake
    Apply the node context reset pattern from fabf8d1 to p2p_handshake. Previous pattern created local AddrMan and Warnings objects, leaving connman holding dangling references across iterations. Reset and reinstall node.addrman and node.peerman each iteration so sanitizers can detect stale pointer usage.
    dfe5d6a81d
  3. DrahtBot added the label Fuzzing on Apr 22, 2026
  4. DrahtBot commented at 4:28 PM on April 22, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    Concept ACK brunoerg

    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.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #35114 (test: NodeClockContext follow-ups by seduless)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. DrahtBot added the label CI failed on Apr 22, 2026
  6. DrahtBot removed the label CI failed on Apr 23, 2026
  7. brunoerg commented at 12:55 PM on April 29, 2026: contributor

    Concept ACK on applying same pattern of process_message.


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-05-13 00:13 UTC

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