Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,344
    • Issues 5,344
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 571
    • Merge requests 571
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #22042
Closed
Open
Incident created Aug 14, 2022 by Shayne Fletcher@shayne-fletcher-da🥝Developer

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 Aug 14, 2022 by Shayne Fletcher
Assignee
Assign to
Time tracking