
#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