fuzz: Fix bugs in `clusterlin_postlinearize_tree` target #34061

pull marcofleon wants to merge 3 commits into bitcoin:master from marcofleon:2025/12/clusterlin-fuzz-fixes changing 1 files +42 −31
  1. marcofleon commented at 3:25 PM on December 12, 2025: contributor

    Addresses two issues in the clusterlin_postlinearize_tree target:

    1. The loop iteration while creating tree dependency graphs was incorrect.
    2. We were accidentally passing in post_linearization to PostLinearize instead of the copy we just made, resulting in an ineffective check.
  2. fuzz: Fix incorrect loop bounds in `clusterlin_postlinearize_tree`
    The dependency graphs generated by this test can have holes
    (unused indices) in them. This means some of the transactions
    were skipped when using `depgraph_gen.TxCount()` as the upper
    bound of the loop. Switch to using `depgraph.Positions()` to
    correctly handle sparse graphs.
    876e2849b4
  3. fuzz: Fix variable in `clusterlin_postlinearize_tree` check
    The test intends to verify that running `PostLinearize` a
    second time on a tree-structured graph doesn't change the
    result. But `PostLinearize` was being called on the original
    variable, not the copy. So the check was comparing the
    unmodified copy against itself, which is useless.
    
    Fix by post-linearizing the correct variable.
    ce29d7d626
  4. refactor: Separate out logic for building a tree-shaped dependency graph a70a14a3f4
  5. DrahtBot added the label Tests on Dec 12, 2025
  6. DrahtBot commented at 3:26 PM on December 12, 2025: 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/34061.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK sipa, instagibbs

    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-->

  7. fanquake added the label Fuzzing on Dec 12, 2025
  8. fanquake commented at 3:28 PM on December 12, 2025: member
  9. sipa commented at 3:33 PM on December 12, 2025: member

    ACK a70a14a3f4f4d66025302c00eb4ff8108835cc5d

  10. instagibbs approved
  11. instagibbs commented at 4:44 PM on December 12, 2025: member

    ACK a70a14a3f4f4d66025302c00eb4ff8108835cc5d

  12. fanquake merged this on Dec 14, 2025
  13. fanquake closed this on Dec 14, 2025


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

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