diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-04-05 07:28:41 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-04-05 07:28:45 +0200 |
commit | 824eea5643a1a317c04efcbd30268e46b9165a3c (patch) | |
tree | fcad7a2a8ee118c926181a1315099c423d14a211 /src/rpc/util.cpp | |
parent | 590e49ccf2af27c6c1f1e0eb8be3a4bf4d92ce8b (diff) | |
parent | 585854ac66a61fbb60849c2dfdd03f10b0150c75 (diff) | |
download | bitcoin-824eea5643a1a317c04efcbd30268e46b9165a3c.tar.xz |
Merge #21599: test: Replace file level integer overflow suppression with function level suppression
585854ac66a61fbb60849c2dfdd03f10b0150c75 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 585854ac66a61fbb60849c2dfdd03f10b0150c75, I have reviewed the code and it looks OK, I agree it can be merged.
Tree-SHA512: 5a343f028c1e1a1aba3b51a0eced605849184891ffafecb3cd2b424c6cfea01afd7c2672274936b0bac646075ec066408a570bf6b34bc9b87399a53ce20d8a23
Diffstat (limited to 'src/rpc/util.cpp')
0 files changed, 0 insertions, 0 deletions