[GHC] #13576: Runtime crashes on arm64 (iOS)

GHC ghc-devs at haskell.org
Tue Apr 25 19:29:59 UTC 2017


#13576: Runtime crashes on arm64 (iOS)
----------------------------------+-------------------------------
        Reporter:  jp.rider63     |                Owner:  (none)
            Type:  bug            |               Status:  new
        Priority:  high           |            Milestone:  8.4.1
       Component:  Compiler       |              Version:
      Resolution:                 |             Keywords:
Operating System:  MacOS X        |         Architecture:  aarch64
 Type of failure:  Runtime crash  |            Test Case:
      Blocked By:                 |             Blocking:
 Related Tickets:                 |  Differential Rev(s):
       Wiki Page:                 |
----------------------------------+-------------------------------

Comment (by jp.rider63):

 As mentioned on irc, applying D3290 before building the cross-compiler did
 not work. The diff of nm is ~800k lines so I don't think it will be much
 help (the x86 library was built with a different version of ghc so there
 are different library versions and different symbols).

 I've been trying to create a minimal example to demonstrate the crash. So
 far I have had mixed results. Calling `hs_AAPublicKeyAlgorithm` by itself
 does cause the crash. Oddly, when I call `hs_testf` (defined below) before
 `hs_AAPublicKeyAlgorithm`, the crash goes away.

 {{{
 class Test a b | a -> b where
     testF :: a -> b

 instance Test String String where
     testF = id

 foreign export ccall hs_astr :: IO (StablePtr String)
 hs_astr :: IO (StablePtr String)
 hs_astr = newStablePtr "a string"

 foreign export ccall hs_testf :: StablePtr String -> IO (StablePtr String)
 hs_testf :: StablePtr String -> IO (StablePtr String)
 hs_testf s = do
     s' <- deRefStablePtr s
     newStablePtr $ testF s'
 }}}

 I was thinking that maybe the functional dependency from `ToAlgorithm t a
 | t -> a` is causing the crash, but I'm not really sure.

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


More information about the ghc-tickets mailing list