Skip to content

Conversation

@vszakats
Copy link
Contributor

@vszakats vszakats commented Oct 29, 2025

ARM64 ASM on Windows generates a lot of -Wasm-operand-widths compiler
warnings (with llvm/clang). It also seems to break bignum calculations,
resulting in:

curl: (35) TLS connect error: error:04FFF077:rsa routines:CRYPTO_internal:wrong signature length

and other issues.

This option did not cause an issue with MSVC ARM64. The reason for this
is that the only ASM code for ARM64 is the bignum implementation
(crypto/bn/arch/aarch64) and that ASM code is guarded for __GNUC__,
meaning gcc and llvm/clang, and never MSVC or clang-cl.

Follow-up to 1df6b52 #1177
Fixes #1210

@botovq
Copy link
Contributor

botovq commented Oct 29, 2025

Thanks. I'll leave it to @4a6f656c and @busterb to puzzle this out. It smells a bit like the usual long vs long long issue with bignums on Windows.

@botovq botovq requested review from 4a6f656c and busterb October 29, 2025 21:17
@vszakats vszakats changed the title cmake: disable ARM64 ASM on Windows by default cmake: disable ARM64 ASM on Windows Oct 29, 2025
ARM64 ASM on Windows generates a lot of `-Wasm-operand-widths` compiler
warnings. It also seems to break bignum calculations, resulting in:
```
curl: (35) TLS connect error: error:04FFF077:rsa routines:CRYPTO_internal:wrong signature length
```
and other issues.

This option did not cause an issue with MSVC ARM64. The reason for this
is that the only ASM code for ARM64 is the bignum implementation
(crypto/bn/arch/aarch64) and that ASM code is guarded for `__GNUC__`,
meaning gcc and llvm/clang, and never MSVC or clang-cl.

Follow-up to 1df6b52 libressl#1177
Fixes libressl#1210
@vszakats
Copy link
Contributor Author

Thanks. I'll leave it to @4a6f656c and @busterb to puzzle this out. It smells a bit like the usual long vs long long issue with bignums on Windows.

You're very welcome. Yes, that matches my impression.

(Amended the patch to avoid checking DEFINED. This point is past options(ENABLE_ASM ...) so it doesn't work. Going with simply forcing false. It can be deleted once the ASM code is implemented for Windows.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

-Wasm-operand-widths when building 4.2.0 for ARM64 Windows (+ ASM bignum seems broken)

2 participants