aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRyan Ofsky <ryan@ofsky.org>2024-02-05 16:16:14 -0500
committerRyan Ofsky <ryan@ofsky.org>2024-03-18 11:28:40 -0500
commit63e8fc912c21a2f5b47e8eab10fb13c604afed85 (patch)
tree50028b0829b252e970bb036e4668e3331a0ca6d8 /test
parentf252e687ec94b6ccafb5bc44b7df3daeb473fdea (diff)
downloadbitcoin-63e8fc912c21a2f5b47e8eab10fb13c604afed85.tar.xz
ci: add getchaintxstats ubsan suppressions
Add ubsan suppressions for integer overflows in the getchaintxstats RPC. getchainstatstx line "int nTxDiff = pindex->nChainTx - past_block.nChainTx" can trigger ubsan integer overflows when assumeutxo snapshots are loaded, from subtracting unsigned values and assigning the result to a signed int. The overflow behavior probably exists in current code but is hard to trigger because it would require calling getchainstatstx at the right time with specific parameters as background blocks are being downloaded. But the overflow behavior becomes easier to trigger in the upcoming commit removing fake nChainTx values, so a suppression needs to be added before then for CI to pass. getchainstatstx should probably be improved separately in another PR to not need this suppression, and handle edge cases and missing nChainTx values more carefully.
Diffstat (limited to 'test')
-rw-r--r--test/sanitizer_suppressions/ubsan2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/sanitizer_suppressions/ubsan b/test/sanitizer_suppressions/ubsan
index 2a2f7ca470..482667a26a 100644
--- a/test/sanitizer_suppressions/ubsan
+++ b/test/sanitizer_suppressions/ubsan
@@ -51,6 +51,7 @@ unsigned-integer-overflow:CCoinsViewCache::Uncache
unsigned-integer-overflow:CompressAmount
unsigned-integer-overflow:DecompressAmount
unsigned-integer-overflow:crypto/
+unsigned-integer-overflow:getchaintxstats*
unsigned-integer-overflow:MurmurHash3
unsigned-integer-overflow:CBlockPolicyEstimator::processBlockTx
unsigned-integer-overflow:TxConfirmStats::EstimateMedianVal
@@ -61,6 +62,7 @@ implicit-integer-sign-change:CBlockPolicyEstimator::processBlockTx
implicit-integer-sign-change:SetStdinEcho
implicit-integer-sign-change:compressor.h
implicit-integer-sign-change:crypto/
+implicit-integer-sign-change:getchaintxstats*
implicit-integer-sign-change:TxConfirmStats::removeTx
implicit-integer-sign-change:prevector.h
implicit-integer-sign-change:verify_flags