test: Replace file level integer overflow suppression with function level suppression #21599

pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:remove-blanket-signed-integer-overflow-suppression-from-txmempool changing 1 files +1 −2
  1. practicalswift commented at 9:26 PM on April 4, 2021: contributor

    Replace file level (txmempool.cpp) signed integer overflow suppression with function level suppression (CTxMemPool::PrioritiseTransaction). The suppression was added yesterday in #21586.

    Rationale: To avoid risk hiding other signed integer overflows in txmempool.cpp.

    Obviously it would be better if this signed integer overflow fixed instead of suppressed - see details #20626. Any taker? :)

    To hit the issue via fuzzing:

    $ UBSAN_OPTIONS="print_stacktrace=1:halt_on_error=1:report_error_type=1" FUZZ=validation_load_mempool src/test/fuzz/fuzz
    INFO: Seed: 1184244493
    INFO: Loaded 1 modules   (634418 inline 8-bit counters): 634418 [0x55a09fdfbf98, 0x55a09fe96dca),
    INFO: Loaded 1 PC tables (634418 PCs): 634418 [0x55a09fe96dd0,0x55a0a08450f0),
    INFO:     1264 files found in mempool/
    INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 1040698 bytes
    INFO: seed corpus: files: 1264 min: 1b max: 1040698b total: 15997133b rss: 197Mb
    txmempool.cpp:847:15: runtime error: signed integer overflow: -7211388903327006720 + -7211353718954917888 cannot be represented in type 'long'
        [#0](/bitcoin-bitcoin/0/) 0x55a09c3ce2d8 in CTxMemPool::PrioritiseTransaction(uint256 const&, long const&) /home/thomas/bitcoin/src/txmempool.cpp:847:15
    
  2. test: Replace blanket UBSan signed integer overflow suppression for txmempool.cpp with specific suppression 585854ac66
  3. JeremyRubin commented at 9:47 PM on April 4, 2021: contributor

    utACK 585854a

  4. DrahtBot added the label Tests on Apr 4, 2021
  5. hebasto approved
  6. hebasto commented at 11:54 PM on April 4, 2021: member

    ACK 585854ac66a61fbb60849c2dfdd03f10b0150c75, I have reviewed the code and it looks OK, I agree it can be merged.

  7. fanquake renamed this:
    test: Replace file level (txmempool.cpp) signed integer overflow suppression with function level suppression (CTxMemPool::PrioritiseTransaction)
    test: Replace file level integer overflow suppression with function level suppression
    on Apr 5, 2021
  8. MarcoFalke commented at 5:28 AM on April 5, 2021: member

    ACK, I forgot this is possible because all other suppressions use files

  9. MarcoFalke merged this on Apr 5, 2021
  10. MarcoFalke closed this on Apr 5, 2021

  11. MarcoFalke commented at 2:27 PM on April 5, 2021: member

    Sorry for the edit war, but I reverted this in #21604 because due to a bug in clang we can't use symbol names and only file names.

  12. practicalswift deleted the branch on Apr 10, 2021
  13. DrahtBot locked this on Aug 16, 2022

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-15 15:14 UTC

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