[GHC] #9278: GHCi crash: selector _ for message _ does not match selector known to Objective C runtime

GHC ghc-devs at haskell.org
Wed Jul 16 01:04:15 UTC 2014


#9278: GHCi crash: selector _ for message _ does not match selector known to
Objective C runtime
-------------------------------------+-------------------------------------
              Reporter:  mietek      |             Owner:
                  Type:  bug         |            Status:  new
              Priority:  normal      |         Milestone:
             Component:  GHCi        |           Version:  7.6.3
            Resolution:              |          Keywords:  crash, dynamic
Differential Revisions:              |  linking
          Architecture:  x86_64      |  Operating System:  MacOS X
  (amd64)                            |   Type of failure:  GHCi crash
            Difficulty:  Unknown     |         Test Case:
            Blocked By:              |          Blocking:
       Related Tickets:  #9277       |
-------------------------------------+-------------------------------------
Changes (by chak):

 * cc: chak@… (added)


Comment:

 AFAIK, the Objective-C runtime executes some initialisation code to set up
 Objective-C classes. The system linker produces executables that ensure
 that this initialisation is performed before any application code is being
 run. GHC's runtime doesn't know anything about that, though, and will just
 load the Objective-C binary code without performing the required runtime
 initialisation.

 Based on that, I believe, the error message you are seeing is a
 consequence of the selectors for the classes not being registered in the
 data structures used by `objc_msgSend()`.

 Here is a description of the internals of the ObjC runtime:
 http://cocoasamurai.blogspot.com.au/2010/01/understanding-
 objective-c-runtime.html

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


More information about the ghc-tickets mailing list