6.0.0 crash at high precision mul?

David Harvey d.harvey at unsw.edu.au
Thu Jun 5 10:08:42 UTC 2014

On 05/06/2014, at 7:13 PM, Torbjörn Granlund <tg at gmplib.org>

> Although the crash might happen in GMP, when you call via another
> library you need to ask the authors of that library for debugging help.
>  - Calling mpfr_sin(2) at 1,000,000 bits precision works when running on the main thread.
>  - The same call crashes when running on a separate thread.
> To me, these facts point away from mpfr and gmp.  It sounds very much
> like a problem with your code, specifically its system limits
> allocation.

This reminds me very much of a problem I encountered with GMP's xgcd code a few years ago. GMP was using a large-ish amount of stack and it turned out to exceed the default 512 KB thread stack size under mac OS X. Arguably 512 KB is an unhelpfully small default size, but still it was an extremely difficult bug to track down. Here is the relevant discussion on the sage bug tracker (search for "appears to be a stack overflow issue"):



More information about the gmp-discuss mailing list