Skip to content

Commit 824eea5

Browse files
author
MarcoFalke
committed
Merge #21599: test: Replace file level integer overflow suppression with function level suppression
585854a test: Replace blanket UBSan signed integer overflow suppression for txmempool.cpp with specific suppression (practicalswift) Pull request description: 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 0x55a09c3ce2d8 in CTxMemPool::PrioritiseTransaction(uint256 const&, long const&) /home/thomas/bitcoin/src/txmempool.cpp:847:15 ``` ACKs for top commit: JeremyRubin: utACK 585854a hebasto: ACK 585854a, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: 5a343f028c1e1a1aba3b51a0eced605849184891ffafecb3cd2b424c6cfea01afd7c2672274936b0bac646075ec066408a570bf6b34bc9b87399a53ce20d8a23
2 parents 590e49c + 585854a commit 824eea5

File tree

1 file changed

+1
-2
lines changed
  • test/sanitizer_suppressions

1 file changed

+1
-2
lines changed

test/sanitizer_suppressions/ubsan

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -fsanitize=undefined suppressions
22
# =================================
3-
# No suppressions at the moment. Hooray!
3+
signed-integer-overflow:CTxMemPool::PrioritiseTransaction
44

55
# -fsanitize=integer suppressions
66
# ===============================
@@ -100,4 +100,3 @@ shift-base:leveldb/
100100
shift-base:net_processing.cpp
101101
shift-base:streams.h
102102
shift-base:util/bip32.cpp
103-
signed-integer-overflow:txmempool.cpp

0 commit comments

Comments
 (0)