[GHC] #9122: Make Lint check for bad uses of `unsafeCoerce`

GHC ghc-devs at haskell.org
Wed Jan 28 13:46:02 UTC 2015


#9122: Make Lint check for bad uses of `unsafeCoerce`
-------------------------------------+-------------------------------------
        Reporter:  simonpj           |                   Owner:  qnikst
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.8.2
      Resolution:                    |                Keywords:  newcomer
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  None/Unknown      |  Unknown/Multiple
      Blocked By:                    |               Test Case:
 Related Tickets:                    |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by simonpj):

 I don't know how to reason about what might be "an error at some
 particular stage of the pipeline".

 ANY use of `unsafeCoerce` might make a program seg-fault.  So at best
 these checks are going to smoke out uses that are more than usually likely
 to cause this behaviour.  It's all very squishy.  Ask a more specific
 question and I'll try to help.

 S

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


More information about the ghc-tickets mailing list