[MLton] Re: [Haskell-cafe] fastest Fibonacci numbers in the West

Stephen Weeks MLton@mlton.org
Thu, 27 Jan 2005 11:13:43 -0800

> I think this FAQ entry from the GnuMP website explains it.
> Q:  I get a Segfault/Bus error in a program that uses GMP to calculate
> numbers with several hundred thousand digits. Why?
> A: GMP allocates most temporaries on the stack, and some machines give
> user programs very little stack space by default.

That looks like the problem.  I normally run with stack unlimited.
When I set the limit, I get a segfault.

An explanation of the problem and pointer to this part of the GnuMP
FAQ should go on mlton.org/GnuMP.