bus error in Integer calculations

Clinton Mead clintonmead at gmail.com
Fri Dec 9 01:36:28 UTC 2016


I'm not a GHC developer but I think you should report a bug here:
https://ghc.haskell.org/trac/ghc/wiki/ReportABug

I've done it a couple of times and if you provide a reproducible test case
it will usually get looked at at some point.

Managing all the bugs on a mailing list would be a nightmare. If you're
worried it might not actually be a bug well they can always just close it.

On Fri, Dec 9, 2016 at 10:43 AM, Geraint Jones <
Geraint.Jones at wolfson.ox.ac.uk> wrote:

> I have this little demo which I use for sixth formers which includes
> calculating in fairly rapid order the sum of the digits of the
> 10^9th Fibonacci number.  (I haven't got enough physical memory to
> do the same for the 10^10th number without thrashing...)  It fell
> over on a flashy new macbook I was going to use for the presentation
> the other day; indeed I found I couldn't even calculate the sum of
> the digits of the 10^6th number.
>
> I've reduced the problem to calculating numbers as large as 2^10000000
> (as an Integer, of course), which works on all the ghci 7.8.4
> implementations I can find on various machines around the department,
> but which falls over on the 8.0.1 implementation on my macbook.
>
> 2^1000000 is fine, but 2^10000000 causes a bus error which may well
> be a stack overflow in libHSinteger-gmp-1.0.0.1-ghc8.0.1.dylib
>
> I don't seem to have easy access to 8.0.1 elsewhere or other
> implementations on a mac.  Does anyone have a handle on whether this
> is a problem with the sizing of the mac implementation or whether it
> is a pervasive 8.0.1 problem?  Either way, it doesn't seem friendly
> that it manifests as an uncaught bus error.
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/glasgow-haskell-users/attachments/20161209/8897aa0d/attachment-0001.html>


More information about the Glasgow-haskell-users mailing list