[GHC] #14561: Panic on levity polymorphic very unsafe coerce

GHC ghc-devs at haskell.org
Mon Dec 11 09:49:24 UTC 2017


#14561: Panic on levity polymorphic very unsafe coerce
-------------------------------------+-------------------------------------
        Reporter:  goldfire          |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.3
      Resolution:                    |             Keywords:
                                     |  LevityPolymorphism
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 I don't want "silly uses" of `unsafeCoerce#` to cause a panic.  GHC should
 never panic.

 This ticket is about an un-saturated use of `unsafeCoerce#`; we can easily
 check for that.

 Simon M raises the question of coercing between boxed and unboxed types.
 That seems very dodgy: the GC now won't see that pointer.  But I suppose
 if you want to print an address there is no other way to do so.
 Regardless, it's a separate point to the saturation one, which is the
 point of this ticket.

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


More information about the ghc-tickets mailing list