This is just a warning, but want to make a note here.
0 CXX libbitcoin_server_a-signet.o
1In file included from /usr/include/c++/10.3.1/cstring:42,
2 from ./uint256.h:10,
3 from ./consensus/params.h:9,
4 from ./signet.h:8,
5 from signet.cpp:5:
6In function 'void* memcpy(void*, const void*, size_t)',
7 inlined from 'void CVectorWriter::write(const char*, size_t)' at ./streams.h:102:19,
8 inlined from 'void base_blob<BITS>::Serialize(Stream&) const [with Stream = CVectorWriter; unsigned int BITS = 256]' at ./uint256.h:99:16,
9 inlined from 'static std::optional<SignetTxs> SignetTxs::Create(const CBlock&, const CScript&)' at ./serialize.h:670:16:
10/usr/include/fortify/string.h:53:25: warning: 'void* __builtin_memcpy(void*, const void*, long unsigned int)' writing between 1 and 32 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
11 53 | return __builtin_memcpy(__od, __os, __n);
12 | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
Expected behavior
Clean happy compilation, something like this which comes from later output:
0...
1 CXX wallet/libbitcoin_wallet_a-db.o
2 CXX wallet/libbitcoin_wallet_a-dump.o
3 CXX wallet/libbitcoin_wallet_a-external_signer_scriptpubkeyman.o
4 CXX wallet/libbitcoin_wallet_a-feebumper.o
5 CXX wallet/libbitcoin_wallet_a-fees.o
6 CXX wallet/libbitcoin_wallet_a-interfaces.o
7...
Actual behavior
Warnings during make
.
To reproduce
0# On Alpine Linux (musl-libc)
1export CFLAGS="-pipe -s -march=native -mtune=native -O3"
2export LDFLAGS="-s -no-pie"
3
4test -x ./configure || ./autogen.sh
5./configure \
6 --without-gui \
7 --with-incompatible-bdb \
8 --disable-tests \
9 --disable-bench \
10 --disable-zmq \
11 --disable-hardening \
12 CFLAGS="$CFLAGS" \
13 CXXFLAGS="$CFLAGS" \
14 LDFLAGS="$LDFLAGS"
15make prefix=$HOME/bitcoin-latest install
System information
Alpine Linux (musl-libc x86_64)
0$ uname -mr
15.10.61-0-lts x86_64
Self-compiled Bitcoin Core exactly from jsarenik/bitcoin@878d8e1c0
This warning was experienced while compiling version of bitcoin to test #23531 while also rebasing #22563 on top of it and also Alpine Linux locales patch.
All the rebasing was trivial and maybe the warning is showing for longer but now I noticed it for the first time.