Re: [GHC] #7110: Stack overflow when compiling with optimizations

2012-08-23 Thread GHC
#7110: Stack overflow when compiling with optimizations
---+
  Reporter:  EyalLotem |  Owner:  
  Type:  bug   | Status:  closed  
  Priority:  normal|  Milestone:  
 Component:  Compiler  |Version:  7.4.1   
Resolution:  duplicate |   Keywords:  
Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
   Failure:  Runtime crash | Difficulty:  Unknown 
  Testcase:|  Blockedby:  
  Blocking:|Related:  
---+
Changes (by simonpj):

  * status:  new = closed
  * difficulty:  = Unknown
  * resolution:  = duplicate


Comment:

 Happily this is already fixed; it's a dup of #5920 and #5997.

 Simon

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7110#comment:2
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


[GHC] #7110: Stack overflow when compiling with optimizations

2012-08-01 Thread GHC
#7110: Stack overflow when compiling with optimizations
--+-
 Reporter:  EyalLotem |  Owner:  
 Type:  bug   | Status:  new 
 Priority:  normal|  Component:  Compiler
  Version:  7.4.1 |   Keywords:  
   Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
  Failure:  Runtime crash |   Testcase:  
Blockedby:|   Blocking:  
  Related:|  
--+-
 This program:
 {{{
 import Control.Exception (evaluate)

 main :: IO ()
 main = do
   let smap = concat . replicate 300 $ concat [ , replicate 2027 '#', 
 \n]
   evaluate $ fst (stringReader 1 smap)

 stringReader :: Int - String - ((), String)
 stringReader 1 ('\r':'\n':_) = ((), )
 stringReader _ ('\n':cs) = stringReader 1 cs -- unix
 stringReader x (_:cs) = stringReader x cs
 stringReader _ _ = ((), )
 }}}

 Causes a stack overflow when compiled with -O2, and no problem when
 compiled without optimizations.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7110
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


Re: [GHC] #7110: Stack overflow when compiling with optimizations

2012-08-01 Thread GHC
#7110: Stack overflow when compiling with optimizations
--+-
 Reporter:  EyalLotem |  Owner:  
 Type:  bug   | Status:  new 
 Priority:  normal|  Component:  Compiler
  Version:  7.4.1 |   Keywords:  
   Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
  Failure:  Runtime crash |   Testcase:  
Blockedby:|   Blocking:  
  Related:|  
--+-

Comment(by EyalLotem):

 Note that smap is not the culprit (it has the same result when reading
 smap from a file via readFile).

 stringReader is the culprit.

 If the argument order to stringReader is flipped, the stack overflow goes
 away.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7110#comment:1
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