6.0.0 crash at high precision mul?

Vincent Lefevre vincent at vinc17.net
Thu Jun 5 12:21:49 UTC 2014

On 2014-06-05 14:10:29 +0200, Torbjörn Granlund wrote:
> Marc Glisse <marc.glisse at inria.fr> writes:
>   Yes, better replace 65536 with something smaller in gmp-impl.h.
> That's 65536 bytes, or 8192 limbs on a 64-bit machine.  It is not clear
> to me that this is a too high limit, not even for a system with tiny
> stack size defaults.
> Perhaps mpfr allocates some larger amount of stack before dropping into
> GMP?

MPFR also does allocations in the stack, with:

#define TMP_ALLOC(n) (MPFR_LIKELY ((n) < 16384) ?       \
                      alloca (n) : mpfr_tmp_allocate (&tmp_marker, (n)))

This can occur recursively... Then I don't know whether this is
the cause of the crash.

Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

More information about the gmp-discuss mailing list