|
[GHC] #876: stack overflow on 'length . filter odd $ [0 .. 999999999]': msg#00163lang.haskell.glasgow.bugs
#876: stack overflow on 'length . filter odd $ [0 .. 999999999]' --------------------------------+------------------------------------------- Reporter: ariep@xxxxxxxxx | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 6.5 Severity: normal | Keywords: Os: Linux | Difficulty: Unknown Architecture: x86 | --------------------------------+------------------------------------------- The program {{{ module Main where main = print $ length . filter odd $ [0 .. 999999999] }}} , compiled with ghc-6.5.20060508 or later with optimisation turned on (-O), overflows the stack when run. It seems that the generated code is not tail-recursive. 6.4.2 and 6.5 snapshots up to 20060507 do not have this problem. This may be a silly example, but the same thing happens if you replace 'odd' with some more interesting predicate, and let the length of the input list be chosen by the user. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/876> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler_______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@xxxxxxxxxxx http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [GHC] #874: SEGFAULT in stg_ap_ppp_info(), GHC |
|---|---|
| Next by Date: | [GHC] #877: Template Haskell doesn't parse data decls properly, GHC |
| Previous by Thread: | [GHC] #875: assert fails on HEAD, GHC |
| Next by Thread: | Re: [GHC] #876: stack overflow on 'length . filter odd $ [0 .. 999999999]', GHC |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |