Skip to content

AArch64 NCG doesn't support -falignment-sanitisation

Compiling a module with -falignment-sanitisation using aarch64 ncg produces the following error:

<no location info>: error:
    panic! (the 'impossible' happened)
  GHC version 9.4.4:
        getRegister' (monadic CmmMachOp):
  %MO_AlignmentCheck_8_W64(R1)
  Call stack:
      CallStack (from HasCallStack):
        callStackDoc, called at compiler/GHC/Utils/Panic.hs:182:37 in ghc:GHC.Utils.Panic
        pprPanic, called at compiler/GHC/CmmToAsm/AArch64/CodeGen.hs:651:14 in ghc:GHC.CmmToAsm.AArch64.CodeGen

Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug


<no location info>: error:
    panic! (the 'impossible' happened)
  GHC version 9.4.4:
        getRegister' (monadic CmmMachOp):
  %MO_AlignmentCheck_8_W64(R1)
  Call stack:
      CallStack (from HasCallStack):
        callStackDoc, called at compiler/GHC/Utils/Panic.hs:182:37 in ghc:GHC.Utils.Panic
        pprPanic, called at compiler/GHC/CmmToAsm/AArch64/CodeGen.hs:651:14 in ghc:GHC.CmmToAsm.AArch64.CodeGen

Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug

This is reported by ghc-9.4.4 on aarch64-darwin, though according to https://gitlab.haskell.org/ghc/ghc/-/blob/master/compiler/GHC/CmmToAsm/AArch64/CodeGen.hs#L653 , it's never implemented in the first place.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information