test: fix `ReadTopologicalSet` unsigned integer overflow #33007

pull ismaelsadeeq wants to merge 1 commits into bitcoin:master from ismaelsadeeq:07-2025-cluster-linearize-ub-fix changing 1 files +1 −1
  1. ismaelsadeeq commented at 1:54 PM on July 18, 2025: member

    This PR is a simple fix for a potential unsigned integer overflow in ReadTopologicalSet. We obtain the value of mask from fuzz input, which can be the maximum representable value. Adding 1 to it would then cause an overflow.

    The fix skips the addition when the read value is already the maximum.

    See #30605 (review) for more context

  2. DrahtBot added the label Tests on Jul 18, 2025
  3. DrahtBot commented at 1:54 PM on July 18, 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/33007.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK maflcko
    Concept ACK sipa

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  4. ismaelsadeeq commented at 1:55 PM on July 18, 2025: member
  5. test: fix ReadTopologicalSet unsigned integer overflow 31c4e77a25
  6. ismaelsadeeq force-pushed on Jul 18, 2025
  7. DrahtBot added the label CI failed on Jul 18, 2025
  8. DrahtBot commented at 1:57 PM on July 18, 2025: contributor

    <!--85328a0da195eb286784d51f73fa0af9-->

    🚧 At least one of the CI tasks failed. <sub>Task ARM, unit tests, no functional tests: https://github.com/bitcoin/bitcoin/runs/46263518304</sub> <sub>LLM reason (✨ experimental): Compilation failed due to an undefined symbol 'nonzero' in source file cluster_linearize.cpp.</sub>

    <details><summary>Hints</summary>

    Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:

    • Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    • A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.

    • An intermittent issue.

    Leave a comment here, if you need help tracking down a confusing failure.

    </details>

  9. sipa commented at 1:59 PM on July 18, 2025: member

    utACK

  10. maflcko commented at 2:26 PM on July 18, 2025: member

    lgtm ACK 31c4e77a256c15c221dcc278883f6d3be55660b4

  11. DrahtBot requested review from sipa on Jul 18, 2025
  12. maflcko added this to the milestone 30.0 on Jul 18, 2025
  13. DrahtBot removed the label CI failed on Jul 18, 2025
  14. fanquake merged this on Jul 21, 2025
  15. fanquake closed this on Jul 21, 2025

  16. ismaelsadeeq deleted the branch on Jul 21, 2025
  17. sedited referenced this in commit 02ded863ba on Jul 28, 2025
  18. sedited referenced this in commit 52d7f32bd6 on Jul 28, 2025
  19. alexanderwiederin referenced this in commit 28fe919bf7 on Aug 6, 2025
  20. sedited referenced this in commit b98d982d79 on Aug 7, 2025
  21. alexanderwiederin referenced this in commit 4152176d02 on Aug 8, 2025
  22. alexanderwiederin referenced this in commit 9ef94c31db on Aug 8, 2025
  23. stringintech referenced this in commit 71275a1b5e on Aug 17, 2025
  24. yuvicc referenced this in commit 22f55cf11d on Aug 26, 2025
  25. bug-castercv502 referenced this in commit 4aa5572aea on Sep 28, 2025
  26. stickies-v referenced this in commit a19c56cd7c on Nov 4, 2025
  27. Kino1994 referenced this in commit 0371cbf134 on Jun 28, 2026
  28. BigcoinBGC referenced this in commit ee841feea7 on Jun 30, 2026
  29. bitcoin locked this on Jul 30, 2026

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-11 09:51 UTC

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