ghc-9.4.1 runghc illegal hardware instruction
Summary
a program calling setSGR
from the System.Console.ANSI
package executed via runghc
exhibits an illegal hardware instruction error.
see this commercial-stack issue for further insights.
Steps to reproduce
execute
cat > Main.hs <<EOF
import System.Console.ANSI
main = do
setSGR [SetColor Foreground Dull Red]
EOF
~/ghc-9.4.1/bin/runghc -hide-all-packages -package --ghc-arg="base-4.17.0.0" -package --ghc-arg="colour-2.3.6" -package --ghc-arg="ansi-terminal-0.11.3" --ghc-arg=-package-db --ghc-arg=$HOME/.cabal/store/ghc-9.4.1/package.db Main.hs
and observe abnormal termination and the bash exit code 132
. (the equivalent 9.2.4 command
~/ghc-9.2.4/bin/runghc -hide-all-packages -package --ghc-arg="base-4.16.3.0" -package --ghc-arg="colour-2.3.6" -package --ghc-arg="ansi-terminal-0.11.3" --ghc-arg=-package-db --ghc-arg=$HOME/.cabal/store/ghc-9.2.4/package.db Main.hs
terminates normally. also, a "raw" ghc command
~/ghc-9.4.1/bin/ghc -o test -hide-all-packages -package "base-4.17.0.0" -package "colour-2.3.6" -package "ansi-terminal-0.11.3" -package-db $HOME/.cabal/store/ghc-9.4.1/package.db Main.hs&&./test
terminates normally too.)
Expected behavior
terminate normally with no output and bash exit code 0
Environment
- GHC version used: ghc-9.4.1
Optional:
- Operating System: macOS monterey
- System Architecture: x86_64
Edited by Shayne Fletcher