Compiler segfault building floskell in windows 10
Compiler throws not deterministic segfaults in the floskell package, in the module Floskell.Pretty when building it as dependency of haskell-language-server in windows.
With ghc-8.8.4 and ghc-8.8.3 i ve got:
[10 of 12] Compiling Floskell.Pretty ( src\Floskell\Pretty.hs, dist\build\Floskell\Pretty.o ) Access violation in generated code when executing data at 0xffffffff8237cb40 Attempting to reconstruct a stack trace... Frame Code address * 0x461dab0 0xffffffff8237cb40 * 0x461dab8 0x2d006300680067 * 0x461dac0 0x2e0038002e0038 * 0x461dac8 0x690000005c0034 * 0x461dad0 0x5c006e D:\bin\stack\x86_64-windows\ghc-8.8.4\bin\ghc.exe+0x1c006e D:\bin\stack\x86_64-windows\ghc-8.8.4\bin\ghc-8.8.4.exe returned ExitFailure 11
[10 of 12] Compiling Floskell.Pretty ( src\Floskell\Pretty.hs, dist\build\Floskell\Pretty.o ) D:\bin\stack\x86_64-windows\ghc-8.10.1\bin\ghc-8.10.1.exe returned ExitFailure (-1073740791)
Despite the ghc paths i have tested it building with cabal, but the error is thrown with stack as well: Full logs:
- ghc-8.8.3: https://gist.github.com/jneira/58d138a0180e50d24e543d090263f3c3#file-cabal-build-ghc-8-8-3-v3-fresh-store-ko-log
- ghc-8.8.4: https://gist.github.com/jneira/58d138a0180e50d24e543d090263f3c3#file-cabal-build-ghc-8-8-4-v3-ko-log
- ghc-8.10.1: https://gist.github.com/jneira/58d138a0180e50d24e543d090263f3c3#file-cabal-build-ghc-8-10-1-v3-fresh-store-ko-log
However, i have not able to reproduce the error consistently but with windows 10 and ghc-8.8.4.
- building the package itself works for all ghc versions most of the times
- so setting the project as a local package in the cabal.project of hls makesthe build work, most of the times
- i am not able to reproduce it at all in windows 7
Steps to reproduce
Please provide a set of concrete steps to reproduce the issue.
- pull the haskell-language-server project
- build with `cabal --store-dir \path\to\new\store build -w ghc-8.8.4
The compiler should build the module succesfully.
- GHC version used: 8.8.3, 8.8.4 and 8.10.1
- Operating System: Windows 10
- System Architecture: 64 bits
Context: reported originally in the floskell repo: https://github.com/ennocramer/floskell/issues/50