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

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

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33007.

    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.

  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

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

    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.

  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


ismaelsadeeq DrahtBot sipa maflcko


sipa

Labels
Tests

Milestone
30.0


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: 2025-07-23 00:13 UTC

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