0$ CC=gcc CXX=g++ ./configure --with-sanitizers=undefined && make
1$ export UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1:report_error_type=1
2$ FUZZ=utxo_snapshot ./src/test/fuzz/fuzz ../qa-assets/fuzz_seed_corpus/utxo_snapshot/
3streams.cpp:48:24: runtime error: null pointer passed as argument 1, which is declared to never be null
4 [#0](/bitcoin-bitcoin/0/) 0x5634737bcdc0 in AutoFile::write(Span<std::byte const>) src/streams.cpp:48
5 [#1](/bitcoin-bitcoin/1/) 0x5634749e553b in void Serialize<AutoFile, unsigned char const>(AutoFile&, Span<unsigned char const>) serialize.h:288
6 [#2](/bitcoin-bitcoin/2/) 0x5634749e553b in AutoFile& AutoFile::operator<< <Span<unsigned char const> >(Span<unsigned char const> const&) streams.h:527
7 [#3](/bitcoin-bitcoin/3/) 0x5634749e553b in utxo_snapshot_fuzz_target test/fuzz/utxo_snapshot.cpp:45
8 ...
9$ ./src/test/test_bitcoin --run_test="net_tests"
10streams.cpp:49:24: runtime error: null pointer passed as argument 1, which is declared to never be null
11 [#0](/bitcoin-bitcoin/0/) 0x55613837a3ee in AutoFile::write(Span<std::byte const>) src/streams.cpp:49
12 [#1](/bitcoin-bitcoin/1/) 0x55613b9747cc in void Serialize<AutoFile, unsigned char const>(AutoFile&, Span<unsigned char const>) serialize.h:288
13 [#2](/bitcoin-bitcoin/2/) 0x55613b9747cc in AutoFile& AutoFile::operator<< <Span<unsigned char const> >(Span<unsigned char const> const&) streams.h:527
14 [#3](/bitcoin-bitcoin/3/) 0x55613b9747cc in CaptureMessageToFile src/net.cpp:3885
This is harmless since the spans passed to AutoFile::write
will always be of size 0 in this case.