bitcoin: "missing operand" assembler warnings on Windows
On the master branch @673acab223c0f896767b1ae784659df9f95452ae on Ubuntu 23.04:
$ make -C depends HOST=x86_64-w64-mingw32 NO_QT=1 DEBUG=1 NO_HARDEN=1
$ ./configure CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site
$ make
...
CXX crypto/libbitcoin_crypto_base_la-aes.lo
CXX crypto/libbitcoin_crypto_base_la-chacha_poly_aead.lo
CXX crypto/libbitcoin_crypto_base_la-chacha20.lo
CXX crypto/libbitcoin_crypto_base_la-hkdf_sha256_32.lo
CXX crypto/libbitcoin_crypto_base_la-hmac_sha256.lo
CXX crypto/libbitcoin_crypto_base_la-hmac_sha512.lo
CXX crypto/libbitcoin_crypto_base_la-poly1305.lo
CXX crypto/libbitcoin_crypto_base_la-muhash.lo
CXX crypto/libbitcoin_crypto_base_la-ripemd160.lo
CXX crypto/libbitcoin_crypto_base_la-sha1.lo
CXX crypto/libbitcoin_crypto_base_la-sha256.lo
CXX crypto/libbitcoin_crypto_base_la-sha3.lo
CXX crypto/libbitcoin_crypto_base_la-sha512.lo
CXX crypto/libbitcoin_crypto_base_la-siphash.lo
CXX crypto/libbitcoin_crypto_base_la-sha256_sse4.lo
{standard input}: Assembler messages:
{standard input}:42: Warning: missing operand; zero assumed
{standard input}:42: Warning: missing operand; zero assumed
{standard input}:42: Warning: missing operand; zero assumed
{standard input}:42: Warning: missing operand; zero assumed
{standard input}:42: Warning: missing operand; zero assumed
{standard input}:42: Warning: missing operand; zero assumed
{standard input}:42: Warning: missing operand; zero assumed
{standard input}:42: Warning: missing operand; zero assumed
{standard input}:42: Warning: missing operand; zero assumed
{standard input}:42: Warning: missing operand; zero assumed
{standard input}:42: Warning: missing operand; zero assumed
{standard input}:42: Warning: missing operand; zero assumed
{standard input}:42: Warning: missing operand; zero assumed
{standard input}:42: Warning: missing operand; zero assumed
{standard input}:42: Warning: missing operand; zero assumed
{standard input}:42: Warning: missing operand; zero assumed
{standard input}:42: Warning: missing operand; zero assumed
{standard input}:42: Warning: missing operand; zero assumed
CXXLD crypto/libbitcoin_crypto_base.la
...
Having a non-hardened build, the actual reason for the warnings is the absence of the -fstack-protector-all
flag.
cc @sipa
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 20 (20 by maintainers)
FWIW, I assume this issue has existed since this code was introduced, but isn’t harmful apart from preventing compilation, as far as I can tell.
Yes, indirectly. Having that flag or not affects the stack layout. The issue is triggered by the “xfer” variable being allocated at the top of the stack.