[GHC] #10445: Wrong stack space size when using -Ksize

GHC ghc-devs at haskell.org
Fri Dec 2 19:32:45 UTC 2016


#10445: Wrong stack space size when using -Ksize
-------------------------------------+-------------------------------------
        Reporter:  asr               |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.0.1
       Component:  Compiler          |              Version:  7.10.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D938,
       Wiki Page:                    |  Phab:D961
-------------------------------------+-------------------------------------
Description changed by asr:

@@ -37,1 +37,1 @@
- and GHC 7.10.1 reports
+ GHC 7.10.1 reports
@@ -43,1 +43,8 @@
- GHC 7.8.3 and 7.10.1 report an incorrect stack space size.
+ and GHC 7.10.2, 7.10.3. 8.0.1 and 8.0.2-rc1 report
+
+ {{{
+ Stack space overflow: current size 33624 bytes.
+ }}}
+
+
+ GHC >= 7.8.4 report an incorrect stack space size.

New description:

 After compiling the first example in
 https://wiki.haskell.org/Performance/Accumulating_parameter:

 {{{
 $ cat Test.hs

 len :: [a] -> Int
 len []     = 0
 len (x:xs) = len xs + 1

 main :: IO ()
 main = print $ len [1..1000000]
 }}}

 {{{
 $ ghc Test.hs -rtsopts
 }}}

 and running

 {{{
 ./Test +RTS -K10K
 }}}

 GHC 7.6.3 reports

 {{{
 Stack space overflow: current size 10240 bytes.
 }}}

 GHC 7.8.4 reports

 {{{
 Stack space overflow: current size 33632 bytes.
 }}}

 GHC 7.10.1 reports

 {{{
 Stack space overflow: current size 99136 bytes.
 }}}

 and GHC 7.10.2, 7.10.3. 8.0.1 and 8.0.2-rc1 report

 {{{
 Stack space overflow: current size 33624 bytes.
 }}}


 GHC >= 7.8.4 report an incorrect stack space size.

--

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


More information about the ghc-tickets mailing list