[GHC] #12523: Constructor info tables generated by GHCi don't return tagged pointers

GHC ghc-devs at haskell.org
Tue Aug 23 13:22:07 UTC 2016


#12523: Constructor info tables generated by GHCi don't return tagged pointers
-------------------------------------+-------------------------------------
        Reporter:  mniip             |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  GHCi              |              Version:  8.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  GHCi crash        |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 > The whole problem lies in the code assigned to the Y constructor. When
 ghci uses X it uses the compiled info table and entry code so no problem
 arises.

 Ah, I see.  Yes, if the `Y` constructor doesn't return a properly tagged
 result, any compiled code consuming `Y` values is going to seg-fault.
 Hence the need for `unsafeCoerce` to trigger the bug. Normally if `data Y
 = Y String` was interpreted then so is every function that consumes Y
 values.

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


More information about the ghc-tickets mailing list