llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.9k stars 11.94k forks source link

[AArch64][Win] Enabling speculative load hardening with Windows EH raises an error #114291

Open dpaoliello opened 1 week ago

dpaoliello commented 1 week ago

To reproduce, run the existing AArch64 speculative load hardening test targeting Windows and producing an obj:

build\bin\llc.exe < llvm\test\CodeGen\AArch64\speculation-hardening-loads.ll -verify-machineinstrs -mtriple=aarch64-pc-windows-msvc --filetype=obj

Result:

<unknown>:0: error: Incorrect size for deadload prologue: 12 bytes of instructions in range, but .seh directives corresponding to 4 bytes
llvmbot commented 1 week ago

@llvm/issue-subscribers-backend-aarch64

Author: Daniel Paoliello (dpaoliello)

To reproduce, run the existing AArch64 speculative load hardening test targeting Windows and producing an obj: ``` build\bin\llc.exe < llvm\test\CodeGen\AArch64\speculation-hardening-loads.ll -verify-machineinstrs -mtriple=aarch64-pc-windows-msvc --filetype=obj ``` Result: ``` <unknown>:0: error: Incorrect size for deadload prologue: 12 bytes of instructions in range, but .seh directives corresponding to 4 bytes ```
efriedma-quic commented 1 week ago

(Looks like we need to emit "no-op" SEH instructions for the operations in the prologue related to hardening.)