#7453: unsafe coerce without extensions
----------------------------------------+-----------------------------------
Reporter:  guest                        |          Owner:                       
  
    Type:  bug                          |         Status:  new                  
  
Priority:  normal                       |      Component:  Compiler (Type 
checker)
 Version:  7.6.1                        |       Keywords:                       
  
      Os:  Unknown/Multiple             |   Architecture:  Unknown/Multiple     
  
 Failure:  GHC accepts invalid program  |      Blockedby:                       
  
Blocking:                               |        Related:                       
  
----------------------------------------+-----------------------------------

Comment(by ion1):

 This has some security implications as well.

 {{{
 % mueval -e 'let unsafeCoerce v = z where z :: v; z = v where aux = const
 v in (unsafeCoerce (putStrLn "evil IO action") :: () -> ()) ()'
 evil IO action
 ()
 }}}

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

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to