#5639: Computing the sum of all the primes below two million leads to a runtime
system crash
-------------------------------+--------------------------------------------
    Reporter:  manzyuk         |       Owner:                
        Type:  bug             |      Status:  new           
    Priority:  normal          |   Component:  Runtime System
     Version:  7.0.3           |    Keywords:                
    Testcase:                  |   Blockedby:                
          Os:  Linux           |    Blocking:                
Architecture:  x86_64 (amd64)  |     Failure:  Runtime crash 
-------------------------------+--------------------------------------------
Changes (by manzyuk):

 * cc: manzyuk@… (added)


Comment:

 I tried to compile the program on my laptop

 {{{
 manzyuk@paddy:~/tmp$ uname -a
 Linux paddy 2.6.32-35-generic #78-Ubuntu SMP Tue Oct 11 16:11:24 UTC 2011
 x86_64 GNU/Linux
 }}}

 and it runs without visible problems.  Of course, it is unacceptably slow,
 but it doesn't crash.  My laptop runs GHC 7.0.3, and the only difference
 I've noticed so far compared to my desktop is `gcc`:

 {{{
 manzyuk@paddy:~/tmp$ gcc -v
 Using built-in specs.
 Target: x86_64-linux-gnu
 Configured with: ../src/configure -v --with-pkgversion='Ubuntu
 4.4.3-4ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs
 --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-
 shared --enable-multiarch --enable-linker-build-id --with-system-zlib
 --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
 --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4
 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin
 --enable-objc-gc --disable-werror --with-arch-32=i486 --with-tune=generic
 --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
 --target=x86_64-linux-gnu
 Thread model: posix
 gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
 }}}

 Can I provide any other useful information about my desktop?  Or maybe you
 have suggestions how I can try to debug the program?

 Frankly, to my shame, I didn't know it was a horrible way to compute
 primes until yesterday.  I've been taught this wrong implementation of the
 sieve of Eratosthenes, but have never actually tried it before.  I am
 pleased to have re-discovered a queue-based algorithm today.

 I should fix the broken packages, thanks for pointing this out.

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