[GHC] #10375: arm: ghci hits an illegal instruction

GHC ghc-devs at haskell.org
Fri Sep 11 01:22:50 UTC 2015


#10375: arm: ghci hits an illegal instruction
-------------------------------------+-------------------------------------
        Reporter:  erikd             |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  high              |               Milestone:  7.10.3
       Component:  Runtime System    |                 Version:  7.10.1
  (Linker)                           |
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:  arm
 Type of failure:  GHCi crash        |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------
Changes (by erikd):

 * component:  GHCi => Runtime System (Linker)


Comment:

 All the previous debugging had produced confusing, contradictory and un-
 repeatable results so I dropped back to simple wolf-fence debugging with
 `putStrLn` and over about 3 hours managed to narrow this down to the
 function `GhciMonad.turnOffBuffering`. Modifying that function as follows:

 {{{
 turnOffBuffering :: IO ()
 turnOffBuffering
  = do putStrLn "turnOffBuffering start"
       hdls <- mapM getHandle [stdin_ptr,stdout_ptr,stderr_ptr]
       putStrLn "turnOffBuffering middle"
       mapM_ (\h -> hSetBuffering h NoBuffering) hdls
       putStrLn "turnOffBuffering end"
 }}}

 and running the previous test results in:

 {{{
 GHCi, version 7.11.20150910: http://www.haskell.org/ghc/  :? for help
 turnOffBuffering start
 turnOffBuffering middle
 Illegal instruction
 }}}

 so that it seems that calling `hSetBuffering` causes the crash. However,
 `hSetBuffering` is not the problem. Rather, `hSetBuffering` is the first
 function to be run from the `Base` package which is loaded with the
 runtime linker.

 Seeing this reminded me of #2972 which was a linker problem, so modifying
 the "Component" field of this ticket to reflect that.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10375#comment:45>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list