MarcoFalke
fa865287e5
test: Add temporary sanitizer suppression implicit-signed-integer-truncation:netaddress.cpp
3 years ago
MarcoFalke
fa9ebedec3
Reject invalid coin height and output index when loading assumeutxo
3 years ago
MarcoFalke
faca40ec68
test: Add temporary coinstats suppressions
3 years ago
Martin Ankerl
44d05d0a69
test: remove sanitizer suppression for nanobench
...
In #21738 an ASAN suppression for nanobench was added. This is not needed any more,as nanobench.h already includes the necessary suppressions for the relevant code.
4 years ago
eugene
9c891b64ff
net: initialize nMessageSize to max uint32_t instead of -1
...
nMessageSize is uint32_t and is set to -1. This will warn with
-fsanitize=implicit-integer-sign-change.
4 years ago
MarcoFalke
1fcf66af68
Merge bitcoin/bitcoin#21798 : fuzz: Create a block template in tx_pool targets
...
fa03d0acd6
fuzz: Create a block template in tx_pool targets (MarcoFalke)
fa61ce5cf5
fuzz: Limit mocktime to MTP in tx_pool targets (MarcoFalke)
fab646b8ea
fuzz: Use correct variant of ConsumeRandomLengthString instead of hardcoding a maximum size (MarcoFalke)
fae2c8bc54
fuzz: Allow to pass min/max to ConsumeTime (MarcoFalke)
Pull request description:
Relatively simple check to ensure a block can always be created from the mempool
ACKs for top commit:
practicalswift:
Tested ACK fa03d0acd6
Tree-SHA512: e613376ccc88591cbe594db14ea21ebc9b2b191f6325b3aa4ee0cd379695352ad3b480e286134ef6ee30f043d486cf9792a1bc7e44445c41045ac8c3b931c7ff
4 years ago
MarcoFalke
fa03d0acd6
fuzz: Create a block template in tx_pool targets
4 years ago
practicalswift
575792e6ff
fuzz: Add -fsanitize=integer suppression needed for RPC fuzzer
4 years ago
MarcoFalke
fa00bb2c5c
test: Add missing shift-base:nanobench.h suppression
...
Otherwise it is not possible to run bench_bitcoin with clang-12 + ASAN
compiled.
Output:
$ src/bench/bench_bitcoin
bench/nanobench.h:1107:15: runtime error: left shift of 4982565676696827473 by 27 places cannot be represented in type 'uint64_t' (aka 'unsigned long')
#0 0x5623d6a13137 in ankerl::nanobench::Rng::rotl(unsigned long, unsigned int) /bitcoin/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/./bench/nanobench.h:1107:15
#1 0x5623d6a13137 in ankerl::nanobench::Rng::operator()() /bitcoin/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/./bench/nanobench.h:1075:10
#2 0x5623d6a05c5b in ankerl::nanobench::Rng::Rng(unsigned long) /bitcoin/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/./bench/nanobench.h:3135:9
#3 0x5623d6a0ca51 in ankerl::nanobench::detail::IterationLogic::Impl::Impl(ankerl::nanobench::Bench const&) /bitcoin/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/./bench/nanobench.h:2206:13
#4 0x5623d69f8f73 in ankerl::nanobench::detail::IterationLogic::IterationLogic(ankerl::nanobench::Bench const&) /bitcoin/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/./bench/nanobench.h:2215:18
#5 0x5623d690f165 in ankerl::nanobench::Bench& ankerl::nanobench::Bench::run<AddrManAdd(ankerl::nanobench::Bench&)::$_0>(AddrManAdd(ankerl::nanobench::Bench&)::$_0&&) /bitcoin/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/./bench/nanobench.h:1114:28
#6 0x5623d690e26e in AddrManAdd(ankerl::nanobench::Bench&) /bitcoin/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/bench/addrman.cpp:76:11
#7 0x5623d69279d6 in void std::__invoke_impl<void, void (*&)(ankerl::nanobench::Bench&), ankerl::nanobench::Bench&>(std::__invoke_other, void (*&)(ankerl::nanobench::Bench&), ankerl::nanobench::Bench&) /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/invoke.h:60:14
#8 0x5623d6927921 in std::enable_if<is_invocable_r_v<void, void (*&)(ankerl::nanobench::Bench&), ankerl::nanobench::Bench&>, void>::type std::__invoke_r<void, void (*&)(ankerl::nanobench::Bench&), ankerl::nanobench::Bench&>(void (*&)(ankerl::nanobench::Bench&), ankerl::nanobench::Bench&) /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/invoke.h:110:2
#9 0x5623d692775f in std::_Function_handler<void (ankerl::nanobench::Bench&), void (*)(ankerl::nanobench::Bench&)>::_M_invoke(std::_Any_data const&, ankerl::nanobench::Bench&) /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/std_function.h:291:9
#10 0x5623d692dbd5 in std::function<void (ankerl::nanobench::Bench&)>::operator()(ankerl::nanobench::Bench&) const /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/std_function.h:622:14
#11 0x5623d692cd44 in benchmark::BenchRunner::RunAll(benchmark::Args const&) /bitcoin/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/bench/bench.cpp:65:13
#12 0x5623d69282bf in main /bitcoin/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/bench/bench_bitcoin.cpp:63:5
#13 0x7f6812010564 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x28564)
#14 0x5623d685f4dd in _start (/bitcoin/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/bench/bench_bitcoin+0x13754dd)
SUMMARY: UndefinedBehaviorSanitizer: invalid-shift-base bench/nanobench.h:1107:15 in
$ clang --version
Ubuntu clang version 12.0.0-1ubuntu1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
4 years ago
MarcoFalke
fa04eb7d78
test: Document why no symbol names can be used for suppressions
4 years ago
practicalswift
585854ac66
test: Replace blanket UBSan signed integer overflow suppression for txmempool.cpp with specific suppression
4 years ago
MarcoFalke
fad8a97b21
test: Add missing suppression for signed-integer-overflow:txmempool.cpp
4 years ago
MarcoFalke
faff3991a9
ci: Fuzz with integer sanitizer
4 years ago
practicalswift
f0f8b1a076
fuzz: Add UBSan suppressions needed for fuzz tests to not warn under -fsanitize=integer
4 years ago
MarcoFalke
fa6c114ae6
test: Add sanitizer suppressions for AMD EPYC CPUs
4 years ago
MarcoFalke
fa749fbea3
rpc: Replace boost::variant with std::variant for RPCArg.m_fallback
4 years ago
Jonas Schnelli
0f020cdf0a
sanitizers: Add suppression for unsigned-integer-overflow in libstdc++ basic_string.tcc
4 years ago
practicalswift
0ccb3addf6
tests: Remove no longer needed UBSan suppression (float-divide-by-zero in validation.cpp)
4 years ago
Sebastian Falbesoner
5e146022da
wallet: fix scanning progress calculation for single block range
...
If the blockchain is rescanned for a single block (i.e. start and stop hashes
are equal, and with that also the estimated verification progress) the progress
calculation could lead to a NaN value caused by a division by zero, resulting in
an invalid JSON result for the getwalletinfo RPC. Fixed by setting the progress
to zero in that special case.
Co-authored-by: MarcoFalke <falke.marco@gmail.com>
4 years ago
Antoine Poinsot
a3abeec33a
policy/fees: remove a floating-point division by zero
...
Reported-by: practicalswift <practicalswift@users.noreply.github.com>
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
4 years ago
Wladimir J. van der Laan
2bdc476d4d
Merge #17708 : prevector: avoid misaligned member accesses
...
5f26855f10
test: Remove ubsan alignment suppressions (Wladimir J. van der Laan)
9d933ef919
prevector: avoid misaligned member accesses (Anthony Towns)
Pull request description:
Ensure prevector data is appropriately aligned. Earlier discussion in #17530 .
**Edit laanwj**: In contrast to #17530 , it does this without increase in size of any of the coin cache data structures (x86_64, clang)
| Struct | (size,align) before | (size,align) after |
| ------------- | ------------- | ------- |
| Coin | 48, 8 | 48, 8 |
| CCoinsCacheEntry | 56, 8 | 56, 8 |
| CScript | 32, 1 | 32, 8 |
ACKs for top commit:
laanwj:
ACK 5f26855f10
practicalswift:
ACK 5f26855f10
jonatack:
ACK 5f26855f10
Tree-SHA512: 98d112d6856f683d5b212410b73f3071d2994f1efb046a2418a35890aa1cf1aa7c96a960fc2e963fa15241e861093c1ea41951cf5b4b5431f88345eb1dd0a98a
5 years ago
Wladimir J. van der Laan
677fb8e923
test: Add ubsan surpression for crc32c
5 years ago
Wladimir J. van der Laan
5f26855f10
test: Remove ubsan alignment suppressions
...
This can be done now that prevector is properly aligned.
5 years ago
MarcoFalke
fa1bfc476c
ci: ubsan report_error_type=1 and add suppressions
5 years ago
practicalswift
0616138a07
tests: Remove no longer needed UBSan suppressions (issues fixed). Add documentation.
5 years ago
Jonas Schnelli
e9d5e97561
Poly1305: tolerate the intentional unsigned wraparound in poly1305.cpp
6 years ago
practicalswift
d855e4cac8
Avoid triggering undefined behaviour (std::memset(nullptr, 0, 0)) if an invalid string is passed to DecodeSecret(...)
6 years ago
practicalswift
4f4993fe2a
Remove UBSan suppression
6 years ago
MarcoFalke
fa7d36b8e7
test: Move UBSAN suppressions to test/sanitizer_suppressions/ubsan
6 years ago