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. A summary of reviews will appear here.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->


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-04-22 18:12 UTC

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