Skip to content

fuzz: wallet: add target for tx scanning - #32993

Closed
brunoerg wants to merge 1 commit into
bitcoin:masterfrom
brunoerg:2025-06-fuzz-wallet-scan
Closed

brunoerg wants to merge 1 commit into
bitcoin:masterfrom
brunoerg:2025-06-fuzz-wallet-scan

Conversation

@brunoerg

Copy link
Copy Markdown
Contributor

Tracking issue (#29901)

This PR adds a fuzz target for wallet tx scanning (ScanForWalletTransactions). Unfortunately, it's not a regression test for the issue #31474 since it would require a more complex scenario/async operations.

@DrahtBot DrahtBot added the Tests label Jul 16, 2025
@DrahtBot

DrahtBot commented Jul 16, 2025 •

Copy link
Copy Markdown
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

External sites

Reviews

See the guideline and AI policy for information on the review process.

Type Reviewers
Stale ACK Chand-ra

If your review is incorrectly listed, please copy-paste <!--meta-tag:bot-skip--> into the comment that the bot should ignore.

Conflicts

No conflicts as of last run.

LLM Linter (✨ experimental)

Possible places where named args for integral literals may be used (e.g. func(x, /*named_arg=*/0) in C++, and func(x, named_arg=0) in Python):

  • InitBlockFilterIndex([&]{ return interfaces::MakeChain(g_setup->m_node); }, BlockFilterType::BASIC, 1 << 20, true, false) in src/wallet/test/fuzz/scan.cpp

2026-06-12 18:43:50

@brunoerg
brunoerg marked this pull request as ready for review July 16, 2025 13:27
@brunoerg brunoerg mentioned this pull request Jul 16, 2025
11 of 14 tasks
@DrahtBot

Copy link
Copy Markdown
Contributor

🚧 At least one of the CI tasks failed.
Task fuzzer,address,undefined,integer, no depends: https://github.com/bitcoin/bitcoin/runs/46096767347
LLM reason (✨ experimental): Fuzzer crash caused by signed integer overflow in chrono.h during fuzzing process.

Hints

Try to run the tests locally, according to the documentation. However, a CI failure may still
happen due to a number of reasons, for example:

  • Possibly due to a silent merge conflict (the changes in this pull request being
    incompatible with the current code in the target branch). If so, make sure to rebase on the latest
    commit of the target branch.

  • A sanitizer issue, which can only be found by compiling with the sanitizer and running the
    affected test.

  • An intermittent issue.

Leave a comment here, if you need help tracking down a confusing failure.

@fanquake

Copy link
Copy Markdown
Member

https://cirrus-ci.com/task/4897452429410304?logs=ci#L6267:

[10:48:30.374] Run wallet_scan with args ['/ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/bin/fuzz', '-max_total_time=60']INFO: Running with entropic power schedule (0xFF, 100).
[10:48:30.374] INFO: Seed: 1927962085
[10:48:30.374] INFO: Loaded 1 modules   (634026 inline 8-bit counters): 634026 [0x5573df666fb8, 0x5573df701c62), 
[10:48:30.374] INFO: Loaded 1 PC tables (634026 PCs): 634026 [0x5573df701c68,0x5573e00ae708), 
[10:48:30.374] INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 4096 bytes
[10:48:30.374] /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/chrono.h:225:38: runtime error: signed integer overflow: -9223372036854775808 * 1000000000 cannot be represented in type 'long'
[10:48:30.374]     #0 0x5573dc9108bd in std::chrono::duration<long, std::ratio<1l, 1000000000l>> std::chrono::__duration_cast_impl<std::chrono::duration<long, std::ratio<1l, 1000000000l>>, std::ratio<1000000000l, 1l>, long, false, true>::__cast<long, std::ratio<1l, 1l>>(std::chrono::duration<long, std::ratio<1l, 1l>> const&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/chrono.h:225:38
[10:48:30.374]     #1 0x5573dc9108bd in std::enable_if<__is_duration<std::chrono::duration<long, std::ratio<1l, 1000000000l>>>::value, std::chrono::duration<long, std::ratio<1l, 1000000000l>>>::type std::chrono::duration_cast<std::chrono::duration<long, std::ratio<1l, 1000000000l>>, long, std::ratio<1l, 1l>>(std::chrono::duration<long, std::ratio<1l, 1l>> const&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/chrono.h:287:11
[10:48:30.374]     #2 0x5573dc9108bd in std::chrono::duration<long, std::ratio<1l, 1000000000l>>::duration<long, std::ratio<1l, 1l>, void>(std::chrono::duration<long, std::ratio<1l, 1l>> const&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/chrono.h:582:10
[10:48:30.374]     #3 0x5573dc9108bd in std::common_type<std::chrono::duration<long, std::ratio<1l, 1000000000l>>, std::chrono::duration<long, std::ratio<1l, 1l>>>::type std::chrono::operator+<long, std::ratio<1l, 1000000000l>, long, std::ratio<1l, 1l>>(std::chrono::duration<long, std::ratio<1l, 1000000000l>> const&, std::chrono::duration<long, std::ratio<1l, 1l>> const&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/chrono.h:702:36
[10:48:30.374]     #4 0x5573dc9108bd in std::chrono::time_point<std::chrono::_V2::steady_clock, std::common_type<std::chrono::duration<long, std::ratio<1l, 1000000000l>>, std::chrono::duration<long, std::ratio<1l, 1l>>>::type> std::chrono::operator+<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>, long, std::ratio<1l, 1l>>(std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> const&, std::chrono::duration<long, std::ratio<1l, 1l>> const&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/chrono.h:1107:47
[10:48:30.374]     #5 0x5573dc9108bd in wallet::(anonymous namespace)::wallet_scan_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>)::$_1::operator()() const /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/fuzz/./wallet/test/fuzz/scan.cpp:66:44
[10:48:30.374]     #6 0x5573dc9108bd in std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> std::__invoke_impl<std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>>, wallet::(anonymous namespace)::wallet_scan_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>)::$_1&>(std::__invoke_other, wallet::(anonymous namespace)::wallet_scan_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>)::$_1&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/invoke.h:61:14
[10:48:30.374]     #7 0x5573dc9108bd in std::enable_if<is_invocable_r_v<std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>>, wallet::(anonymous namespace)::wallet_scan_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>)::$_1&>, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>>>::type std::__invoke_r<std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>>, wallet::(anonymous namespace)::wallet_scan_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>)::$_1&>(wallet::(anonymous namespace)::wallet_scan_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>)::$_1&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/invoke.h:114:9
[10:48:30.374]     #8 0x5573dc9108bd in std::_Function_handler<std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> (), wallet::(anonymous namespace)::wallet_scan_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>)::$_1>::_M_invoke(std::_Any_data const&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/std_function.h:290:9
[10:48:30.374]     #9 0x5573dd067392 in std::function<std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> ()>::operator()() const /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/std_function.h:591:9
[10:48:30.374]     #10 0x5573dd067392 in wallet::WalletRescanReserver::now() const /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/wallet/./wallet/wallet.h:1110:52
[10:48:30.374]     #11 0x5573dd067392 in wallet::CWallet::ScanForWalletTransactions(uint256 const&, int, std::optional<int>, wallet::WalletRescanReserver const&, bool, bool) /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/wallet/./wallet/wallet.cpp:1781:32
[10:48:30.374]     #12 0x5573dc907a87 in wallet::(anonymous namespace)::wallet_scan_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>) /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/fuzz/./wallet/test/fuzz/scan.cpp:108:33
[10:48:30.374]     #13 0x5573dc949cee in std::function<void (std::span<unsigned char const, 18446744073709551615ul>)>::operator()(std::span<unsigned char const, 18446744073709551615ul>) const /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/std_function.h:591:9
[10:48:30.374]     #14 0x5573dc949cee in test_one_input(std::span<unsigned char const, 18446744073709551615ul>) /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/fuzz/util/./test/fuzz/fuzz.cpp:88:5
[10:48:30.374]     #15 0x5573dc949cee in LLVMFuzzerTestOneInput /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/fuzz/util/./test/fuzz/fuzz.cpp:216:5
[10:48:30.374]     #16 0x5573dbf4e75f in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) (/ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/bin/fuzz+0x1d8075f) (BuildId: 8f6fd4c0e394fcf4793e14ca683880501003032e)
[10:48:30.374]     #17 0x5573dbf4f971 in fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::vector<fuzzer::SizedFile, std::allocator<fuzzer::SizedFile>>&) (/ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/bin/fuzz+0x1d81971) (BuildId: 8f6fd4c0e394fcf4793e14ca683880501003032e)
[10:48:30.374]     #18 0x5573dbf50000 in fuzzer::Fuzzer::Loop(std::vector<fuzzer::SizedFile, std::allocator<fuzzer::SizedFile>>&) (/ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/bin/fuzz+0x1d82000) (BuildId: 8f6fd4c0e394fcf4793e14ca683880501003032e)
[10:48:30.374]     #19 0x5573dbf3c655 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) (/ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/bin/fuzz+0x1d6e655) (BuildId: 8f6fd4c0e394fcf4793e14ca683880501003032e)
[10:48:30.374]     #20 0x5573dbf68a66 in main (/ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/bin/fuzz+0x1d9aa66) (BuildId: 8f6fd4c0e394fcf4793e14ca683880501003032e)
[10:48:30.374]     #21 0x7fe3a629b1c9  (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 282c2c16e7b6600b0b22ea0c99010d2795752b5f)
[10:48:30.374]     #22 0x7fe3a629b28a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 282c2c16e7b6600b0b22ea0c99010d2795752b5f)
[10:48:30.374]     #23 0x5573dbf30a94 in _start (/ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/bin/fuzz+0x1d62a94) (BuildId: 8f6fd4c0e394fcf4793e14ca683880501003032e)
[10:48:30.374] 
[10:48:30.374] SUMMARY: UndefinedBehaviorSanitizer: signed-integer-overflow /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/chrono.h:225:38 
[10:48:30.374] MS: 0 ; base unit: 0000000000000000000000000000000000000000
[10:48:30.375] 
[10:48:30.375] 
[10:48:30.375] artifact_prefix='./'; Test unit written to ./crash-da39a3ee5e6b4b0d3255bfef95601890afd80709
[10:48:30.375] Base64: 

@brunoerg
brunoerg marked this pull request as draft July 16, 2025 15:43
@brunoerg
brunoerg force-pushed the 2025-06-fuzz-wallet-scan branch from ac35ac7 to 747d094 Compare July 16, 2025 16:38
@brunoerg
brunoerg marked this pull request as ready for review July 16, 2025 18:13
@brunoerg

Copy link
Copy Markdown
Contributor Author

https://cirrus-ci.com/task/4897452429410304?logs=ci#L6267:

[10:48:30.374] Run wallet_scan with args ['/ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/bin/fuzz', '-max_total_time=60']INFO: Running with entropic power schedule (0xFF, 100).
[10:48:30.374] INFO: Seed: 1927962085
[10:48:30.374] INFO: Loaded 1 modules   (634026 inline 8-bit counters): 634026 [0x5573df666fb8, 0x5573df701c62), 
[10:48:30.374] INFO: Loaded 1 PC tables (634026 PCs): 634026 [0x5573df701c68,0x5573e00ae708), 
[10:48:30.374] INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 4096 bytes
[10:48:30.374] /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/chrono.h:225:38: runtime error: signed integer overflow: -9223372036854775808 * 1000000000 cannot be represented in type 'long'
[10:48:30.374]     #0 0x5573dc9108bd in std::chrono::duration<long, std::ratio<1l, 1000000000l>> std::chrono::__duration_cast_impl<std::chrono::duration<long, std::ratio<1l, 1000000000l>>, std::ratio<1000000000l, 1l>, long, false, true>::__cast<long, std::ratio<1l, 1l>>(std::chrono::duration<long, std::ratio<1l, 1l>> const&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/chrono.h:225:38
[10:48:30.374]     #1 0x5573dc9108bd in std::enable_if<__is_duration<std::chrono::duration<long, std::ratio<1l, 1000000000l>>>::value, std::chrono::duration<long, std::ratio<1l, 1000000000l>>>::type std::chrono::duration_cast<std::chrono::duration<long, std::ratio<1l, 1000000000l>>, long, std::ratio<1l, 1l>>(std::chrono::duration<long, std::ratio<1l, 1l>> const&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/chrono.h:287:11
[10:48:30.374]     #2 0x5573dc9108bd in std::chrono::duration<long, std::ratio<1l, 1000000000l>>::duration<long, std::ratio<1l, 1l>, void>(std::chrono::duration<long, std::ratio<1l, 1l>> const&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/chrono.h:582:10
[10:48:30.374]     #3 0x5573dc9108bd in std::common_type<std::chrono::duration<long, std::ratio<1l, 1000000000l>>, std::chrono::duration<long, std::ratio<1l, 1l>>>::type std::chrono::operator+<long, std::ratio<1l, 1000000000l>, long, std::ratio<1l, 1l>>(std::chrono::duration<long, std::ratio<1l, 1000000000l>> const&, std::chrono::duration<long, std::ratio<1l, 1l>> const&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/chrono.h:702:36
[10:48:30.374]     #4 0x5573dc9108bd in std::chrono::time_point<std::chrono::_V2::steady_clock, std::common_type<std::chrono::duration<long, std::ratio<1l, 1000000000l>>, std::chrono::duration<long, std::ratio<1l, 1l>>>::type> std::chrono::operator+<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>, long, std::ratio<1l, 1l>>(std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> const&, std::chrono::duration<long, std::ratio<1l, 1l>> const&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/chrono.h:1107:47
[10:48:30.374]     #5 0x5573dc9108bd in wallet::(anonymous namespace)::wallet_scan_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>)::$_1::operator()() const /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/fuzz/./wallet/test/fuzz/scan.cpp:66:44
[10:48:30.374]     #6 0x5573dc9108bd in std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> std::__invoke_impl<std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>>, wallet::(anonymous namespace)::wallet_scan_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>)::$_1&>(std::__invoke_other, wallet::(anonymous namespace)::wallet_scan_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>)::$_1&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/invoke.h:61:14
[10:48:30.374]     #7 0x5573dc9108bd in std::enable_if<is_invocable_r_v<std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>>, wallet::(anonymous namespace)::wallet_scan_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>)::$_1&>, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>>>::type std::__invoke_r<std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>>, wallet::(anonymous namespace)::wallet_scan_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>)::$_1&>(wallet::(anonymous namespace)::wallet_scan_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>)::$_1&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/invoke.h:114:9
[10:48:30.374]     #8 0x5573dc9108bd in std::_Function_handler<std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> (), wallet::(anonymous namespace)::wallet_scan_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>)::$_1>::_M_invoke(std::_Any_data const&) /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/std_function.h:290:9
[10:48:30.374]     #9 0x5573dd067392 in std::function<std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> ()>::operator()() const /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/std_function.h:591:9
[10:48:30.374]     #10 0x5573dd067392 in wallet::WalletRescanReserver::now() const /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/wallet/./wallet/wallet.h:1110:52
[10:48:30.374]     #11 0x5573dd067392 in wallet::CWallet::ScanForWalletTransactions(uint256 const&, int, std::optional<int>, wallet::WalletRescanReserver const&, bool, bool) /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/wallet/./wallet/wallet.cpp:1781:32
[10:48:30.374]     #12 0x5573dc907a87 in wallet::(anonymous namespace)::wallet_scan_fuzz_target(std::span<unsigned char const, 18446744073709551615ul>) /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/fuzz/./wallet/test/fuzz/scan.cpp:108:33
[10:48:30.374]     #13 0x5573dc949cee in std::function<void (std::span<unsigned char const, 18446744073709551615ul>)>::operator()(std::span<unsigned char const, 18446744073709551615ul>) const /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/std_function.h:591:9
[10:48:30.374]     #14 0x5573dc949cee in test_one_input(std::span<unsigned char const, 18446744073709551615ul>) /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/fuzz/util/./test/fuzz/fuzz.cpp:88:5
[10:48:30.374]     #15 0x5573dc949cee in LLVMFuzzerTestOneInput /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/test/fuzz/util/./test/fuzz/fuzz.cpp:216:5
[10:48:30.374]     #16 0x5573dbf4e75f in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) (/ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/bin/fuzz+0x1d8075f) (BuildId: 8f6fd4c0e394fcf4793e14ca683880501003032e)
[10:48:30.374]     #17 0x5573dbf4f971 in fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::vector<fuzzer::SizedFile, std::allocator<fuzzer::SizedFile>>&) (/ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/bin/fuzz+0x1d81971) (BuildId: 8f6fd4c0e394fcf4793e14ca683880501003032e)
[10:48:30.374]     #18 0x5573dbf50000 in fuzzer::Fuzzer::Loop(std::vector<fuzzer::SizedFile, std::allocator<fuzzer::SizedFile>>&) (/ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/bin/fuzz+0x1d82000) (BuildId: 8f6fd4c0e394fcf4793e14ca683880501003032e)
[10:48:30.374]     #19 0x5573dbf3c655 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) (/ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/bin/fuzz+0x1d6e655) (BuildId: 8f6fd4c0e394fcf4793e14ca683880501003032e)
[10:48:30.374]     #20 0x5573dbf68a66 in main (/ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/bin/fuzz+0x1d9aa66) (BuildId: 8f6fd4c0e394fcf4793e14ca683880501003032e)
[10:48:30.374]     #21 0x7fe3a629b1c9  (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 282c2c16e7b6600b0b22ea0c99010d2795752b5f)
[10:48:30.374]     #22 0x7fe3a629b28a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 282c2c16e7b6600b0b22ea0c99010d2795752b5f)
[10:48:30.374]     #23 0x5573dbf30a94 in _start (/ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/bin/fuzz+0x1d62a94) (BuildId: 8f6fd4c0e394fcf4793e14ca683880501003032e)
[10:48:30.374] 
[10:48:30.374] SUMMARY: UndefinedBehaviorSanitizer: signed-integer-overflow /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/chrono.h:225:38 
[10:48:30.374] MS: 0 ; base unit: 0000000000000000000000000000000000000000
[10:48:30.375] 
[10:48:30.375] 
[10:48:30.375] artifact_prefix='./'; Test unit written to ./crash-da39a3ee5e6b4b0d3255bfef95601890afd80709
[10:48:30.375] Base64: 

Fixed, thanks.

@Chand-ra

Chand-ra commented Dec 6, 2025

Copy link
Copy Markdown

tACK 747d094

The target runs without crashing.

@sedited
sedited requested review from marcofleon and rkrux April 19, 2026 07:45
achow101 added a commit that referenced this pull request May 13, 2026
…ethods

dc84a31 wallet: remove fUpdate argument from AddToWalletIfInvolvingMe (rkrux)
94845df wallet: remove update_tx argument from SyncTransaction (rkrux)
6e796e1 wallet: remove fUpdate argument from ScanForWalletTransactions (rkrux)
54e4c0b wallet: remove update argument from RescanFromTime method (rkrux)

Pull request description:

  This caught my attention while going through #32993.

  The corresponding boolean arguments from CWallet methods related to
  updating transactions during the blockchain scanning have been removed
  because effectively these arguments were always passed as true making
  the need for the boolean arguments unnecessary. The only falsy call sites
  were in the unit tests that don't need to test scenarios that never happen
  in actuality.

ACKs for top commit:
  Bicaru20:
    ACK dc84a31. I also think that makes sense to remove the update argument if it is not used.
  achow101:
    ACK dc84a31
  sedited:
    ACK dc84a31
  l0rinc:
    untested code review ACK dc84a31

Tree-SHA512: dfee793c88cc94d4a5b554e29710133ec4ad5e49455413245c7d7004ef71b618b0b2f821fa085415c34d80aeccd182c98e55223d84afbe8b408f64acac0571bb

@ekzyis ekzyis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested 747d094, left two comments.

The ASan crash is not a target crash since it happens after fuzzing is done, but should be addressed before merge, I think. Could be that I'm misreading the importance of it, though.

Comment thread src/wallet/test/fuzz/scan.cpp Resolved
Comment thread src/wallet/test/fuzz/scan.cpp Resolved
@brunoerg
brunoerg force-pushed the 2025-06-fuzz-wallet-scan branch from 747d094 to 904edfc Compare June 12, 2026 18:16
@brunoerg
brunoerg force-pushed the 2025-06-fuzz-wallet-scan branch from 904edfc to fbeba67 Compare June 12, 2026 18:43
@DrahtBot

Copy link
Copy Markdown
Contributor

🚧 At least one of the CI tasks failed.
Task lint: https://github.com/bitcoin/bitcoin/actions/runs/27434430642/job/81092671475
LLM reason (✨ experimental): CI failed because the lint step detected forbidden fs::remove_all usage (remove_all check) in src/wallet/test/fuzz/scan.cpp.

Hints

Try to run the tests locally, according to the documentation. However, a CI failure may still
happen due to a number of reasons, for example:

  • Possibly due to a silent merge conflict (the changes in this pull request being
    incompatible with the current code in the target branch). If so, make sure to rebase on the latest
    commit of the target branch.

  • A sanitizer issue, which can only be found by compiling with the sanitizer and running the
    affected test.

  • An intermittent issue.

Leave a comment here, if you need help tracking down a confusing failure.

@brunoerg

Copy link
Copy Markdown
Contributor Author

Force-pushed:

@brunoerg
brunoerg marked this pull request as draft June 12, 2026 18:52
@brunoerg

Copy link
Copy Markdown
Contributor Author

I just moved it to draft because I want to refactor some stuff here to make it more efficient (current avg exec/s is far from being good).

@fanquake

Copy link
Copy Markdown
Member

I just moved it to draft because I want to refactor some stuff here

What's the status here? Are you still working on this?

@brunoerg

Copy link
Copy Markdown
Contributor Author

I just moved it to draft because I want to refactor some stuff here

What's the status here? Are you still working on this?

Closing for now. working on other stuff.

@brunoerg brunoerg closed this Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants