<!-- This issue tracker is only for technical issues related to Bitcoin Core. General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com. For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/. If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! -->
<!-- Describe the issue -->
This is just a warning, but want to make a note here.
CXX libbitcoin_server_a-signet.o
In file included from /usr/include/c++/10.3.1/cstring:42,
from ./uint256.h:10,
from ./consensus/params.h:9,
from ./signet.h:8,
from signet.cpp:5:
In function 'void* memcpy(void*, const void*, size_t)',
inlined from 'void CVectorWriter::write(const char*, size_t)' at ./streams.h:102:19,
inlined from 'void base_blob<BITS>::Serialize(Stream&) const [with Stream = CVectorWriter; unsigned int BITS = 256]' at ./uint256.h:99:16,
inlined from 'static std::optional<SignetTxs> SignetTxs::Create(const CBlock&, const CScript&)' at ./serialize.h:670:16:
/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=]
53 | return __builtin_memcpy(__od, __os, __n);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
Expected behavior
Clean happy compilation, something like this which comes from later output:
...
CXX wallet/libbitcoin_wallet_a-db.o
CXX wallet/libbitcoin_wallet_a-dump.o
CXX wallet/libbitcoin_wallet_a-external_signer_scriptpubkeyman.o
CXX wallet/libbitcoin_wallet_a-feebumper.o
CXX wallet/libbitcoin_wallet_a-fees.o
CXX wallet/libbitcoin_wallet_a-interfaces.o
...
<!--- What behavior did you expect? -->
Actual behavior
Warnings during make.
<!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->
To reproduce
# On Alpine Linux (musl-libc)
export CFLAGS="-pipe -s -march=native -mtune=native -O3"
export LDFLAGS="-s -no-pie"
test -x ./configure || ./autogen.sh
./configure \
--without-gui \
--with-incompatible-bdb \
--disable-tests \
--disable-bench \
--disable-zmq \
--disable-hardening \
CFLAGS="$CFLAGS" \
CXXFLAGS="$CFLAGS" \
LDFLAGS="$LDFLAGS"
make prefix=$HOME/bitcoin-latest install
<!--- How reliably can you reproduce the issue, what are the steps to do so? -->
System information
Alpine Linux (musl-libc x86_64)
$ uname -mr
5.10.61-0-lts x86_64
<!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->
Self-compiled Bitcoin Core exactly from jsarenik/bitcoin@878d8e1c0
<!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->
<!-- GUI-related issue? What is your operating system and its version? If Linux, what is your desktop environment and graphical shell? -->
<!-- Any extra information that might be useful in the debugging process. -->
<!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. -->
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.