
Hello =), I'm puzzled, and maybe someone can help me out. Why does this happens? $ time ghci -e "last $ take 1000000 $ [1..1000000]" 1000000 real 0m0.673s user 0m0.554s sys 0m0.024s $ time ghci -e "last $ take 1000000 $ [1..]" *** Exception: stack overflow real 0m1.305s user 0m1.057s sys 0m0.062s $ ghci -V The Glorious Glasgow Haskell Compilation System, version 6.6 Looking at http://darcs.haskell.org/ghc-6.6/packages/base/GHC/Enum.lhs , I still have no clue of what may be happening. Any ideas? Should I file a bug on GHC? Thanks, -- Felipe.

On Wed, May 30, 2007 at 11:41:55PM -0300, Felipe Almeida Lessa wrote:
Hello =),
I'm puzzled, and maybe someone can help me out. Why does this happens?
$ time ghci -e "last $ take 1000000 $ [1..1000000]" 1000000
real 0m0.673s user 0m0.554s sys 0m0.024s
$ time ghci -e "last $ take 1000000 $ [1..]" *** Exception: stack overflow
real 0m1.305s user 0m1.057s sys 0m0.062s
$ ghci -V The Glorious Glasgow Haskell Compilation System, version 6.6
Looking at http://darcs.haskell.org/ghc-6.6/packages/base/GHC/Enum.lhs , I still have no clue of what may be happening. Any ideas? Should I file a bug on GHC?
No, because anything you file will be closed immediately as "duplicate of http://hackage.haskell.org/trac/ghc/ticket/1097" Stefan

On 5/30/07, Stefan O'Rear
No, because anything you file will be closed immediately as "duplicate of http://hackage.haskell.org/trac/ghc/ticket/1097"
Oh, sorry for not having searched better for this problem on the net. I spend a lot of time finding out where the stack was blowing and forgot to google about it. Thanks, -- Felipe.

On Thu, May 31, 2007 at 12:15:01AM -0300, Felipe Almeida Lessa wrote:
On 5/30/07, Stefan O'Rear
wrote: No, because anything you file will be closed immediately as "duplicate of http://hackage.haskell.org/trac/ghc/ticket/1097"
Oh, sorry for not having searched better for this problem on the net. I spend a lot of time finding out where the stack was blowing and forgot to google about it.
You don't need to feel too bad about this: 19:52 < dons> sorear: be nice to people reporting bugs please. 19:53 * sorear grumbles 19:53 * sorear wishes he had more luck with this "politeness" thing 19:54 < dons> try the same text, but hadd 'thanks for the report! looks like a duplicate of ... . cheers, .." 19:54 < dons> makes a huge different to the scared guy at the other end just hoping to help 19:55 < SamB_XP> please don't eat me! Stefan

On 5/31/07, Stefan O'Rear
You don't need to feel too bad about this: [snip]
Don't worry, I should have googled anyway =). BTW, how do you usually proceed when finding out why your code said "Segmentation fault."? (should this question move to a new thread?) Thanks, -- Felipe.

On Thu, May 31, 2007 at 12:34:36AM -0300, Felipe Almeida Lessa wrote:
On 5/31/07, Stefan O'Rear
wrote: You don't need to feel too bad about this: [snip]
Don't worry, I should have googled anyway =).
BTW, how do you usually proceed when finding out why your code said "Segmentation fault."? (should this question move to a new thread?)
I skim the GHC bugs listing, then file one. The nice thing about segmentation faults is that (assuming you aren't using stuff like unsafeCoerce#) they are never your fault, and always GHC bugs. Stefan

On 5/31/07, Felipe Almeida Lessa
BTW, how do you usually proceed when finding out why your code said "Segmentation fault."? (should this question move to a new thread?)
$ gdb my_crashing_program [wait till crush] [on the gdb command line:] $ bt [prints backtrace] If you're lucky, this helps a little. ;)

Felipe Almeida Lessa wrote:
On 5/31/07, Stefan O'Rear
wrote: You don't need to feel too bad about this: [snip]
Don't worry, I should have googled anyway =).
BTW, how do you usually proceed when finding out why your code said "Segmentation fault."? (should this question move to a new thread?)
Always submit a bug report. If you can search around first and try to find an existing report of the same bug then that's great, but if you don't do this then we will (and we're happy to!). Cheers, Simon (who likes the smell of segfaults in the morning)
participants (4)
-
Felipe Almeida Lessa
-
Simon Marlow
-
Stefan O'Rear
-
Thomas Schilling