Skip to content

Conversation

@kyulee-com
Copy link

@kyulee-com kyulee-com commented Dec 13, 2025

Description

The wolfssl ARM assembly files were mixing ELF syntax (:lo12:) with Darwin syntax (@PAGEOFF) in the same instruction, which causes a clang-21 assembler crash with the error "cannot apply another specifier to MCSpecifierExpr". On Darwin/Apple platforms, @PAGEOFF already represents the low 12 bits of the address, so the :lo12: prefix is redundant and incorrect. This was causing UNREACHABLE assertion failures in AsmParser.cpp when building with clang-21.
The fix removes the :lo12: prefix from instructions using @PAGEOFF on Apple platforms in both armv8-sha3-asm.S and armv8-sha512-asm.S.

Testing

Confirmed the build didn't crash with new clang on Mac.

The wolfssl ARM assembly files were mixing ELF syntax (:lo12:) with Darwin syntax (@PAGEOFF) in the same instruction, which causes a clang-21 assembler crash with the error "cannot apply another specifier to MCSpecifierExpr". On Darwin/Apple platforms, @PAGEOFF already represents the low 12 bits of the address, so the :lo12: prefix is redundant and incorrect. This was causing UNREACHABLE assertion failures in AsmParser.cpp when building with pika-26.3-staging toolchain.
The fix removes the :lo12: prefix from instructions using @PAGEOFF on Apple platforms in both armv8-sha3-asm.S and armv8-sha512-asm.S.
@wolfSSL-Bot
Copy link

Can one of the admins verify this patch?

@SparkiDev
Copy link
Contributor

SparkiDev commented Dec 14, 2025

Hi @kyulee-com,

Thanks for letting us know!

The code you changed is generated and there are many more places where this fix is required.
Closing in favour of #9537

Sean

@SparkiDev SparkiDev closed this Dec 14, 2025
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.

3 participants