#2989: ByteString causes C stack overflow in generated code
--------------------+-------------------------------------------------------
Reporter:  Olathe   |          Owner:                  
    Type:  bug      |         Status:  new             
Priority:  normal   |      Component:  Compiler        
 Version:  6.10.1   |       Severity:  normal          
Keywords:           |       Testcase:                  
      Os:  Windows  |   Architecture:  Unknown/Multiple
--------------------+-------------------------------------------------------
 I accidentally left off the apostrophe in the following code.
 {{{
 cData = L.copy cData'
 }}}

 That's how I found out that 'fix copy' causes Haskell programs to die.

 {{{
 import Data.ByteString.Lazy
 import Control.Monad.Fix
 main = print (fix copy)
 }}}

 {{{
 >ghc file.hs

 >main
 C stack overflow in generated code

 >ghci
 GHCi, version 6.10.1: http://www.haskell.org/ghc/  :? for help
 Loading package ghc-prim ... linking ... done.
 Loading package integer ... linking ... done.
 Loading package base ... linking ... done.
 Prelude> Control.Monad.Fix.fix Data.ByteString.copy
 Loading package bytestring-0.9.1.4 ... linking ... done.
 "
 >ghci
 GHCi, version 6.10.1: http://www.haskell.org/ghc/  :? for help
 Loading package ghc-prim ... linking ... done.
 Loading package integer ... linking ... done.
 Loading package base ... linking ... done.
 Prelude> Control.Monad.Fix.fix Data.ByteString.Lazy.copy
 Loading package bytestring-0.9.1.4 ... linking ... done.

 >
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2989>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to