#5920: stack overflow in strict function depending on return type
---------------------------------+------------------------------------------
    Reporter:  ben0x539          |       Owner:  simonpj         
        Type:  bug               |      Status:  patch           
    Priority:  normal            |   Milestone:  7.6.1           
   Component:  Compiler          |     Version:  7.4.1           
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  Runtime crash   
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------

Comment(by simonpj@…):

 commit b8ff4448d899f783fc112f3774aab626979a4f22
 {{{
 Author: Simon Peyton Jones <[email protected]>
 Date:   Fri Apr 13 17:38:32 2012 +0100

     Fix worker/wrapper for CPR functions

     A long-standing and egregious bug in the worker/wrapper code meant
     that some functions with the CPR property weren't getting a CPR
     w/w. And that had the effect of making a tail-recursive function not
     tail recursive.  As well as increasing allocation.

     Fixes Trac #5920, and #5997.

     Nofib results (highlights):

             Program           Size    Allocs   Runtime   Elapsed  TotalMem
 
--------------------------------------------------------------------------------
              boyer2          -0.1%    -15.3%      0.01      0.01     +0.0%
             mandel2          -0.0%     -8.1%      0.01      0.01     +0.0%
                para          -0.1%    -11.8%     -7.9%     -7.8%     +0.0%
 
--------------------------------------------------------------------------------
                 Min          -0.1%    -15.3%     -7.9%     -7.8%    -33.3%
                 Max          +0.0%     +0.2%     +6.3%     +6.3%     +3.7%
      Geometric Mean          -0.0%     -0.4%     +0.1%     +0.1%     -0.5%

     Looks like a clear win.  And I have not even recompiled the libraries,
 so
     it'll probably be a bit better in the ed.

  compiler/stranal/DmdAnal.lhs |   13 ++++++-------
  compiler/stranal/WwLib.lhs   |   25 ++++++++++++++++---------
  2 files changed, 22 insertions(+), 16 deletions(-)
 }}}

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