6.0.0 crash at high precision mul?

Viktor Kletzhändler vkletzhaendler at swissonline.ch
Sat Jun 7 19:49:55 UTC 2014


Thanks a lot for your work and the patch.

The new build doesn't crash when running on a separate tread. Unfortunately, it doesn't run faster, either.

GCD uses pthreads, but the API doesn't let you create, configure, and assign threads. The system threads probably use the default pthread stack size, see
https://developer.apple.com/library/mac/documentation/Performance/Reference/GCD_libdispatch_Ref/Reference/reference.html.

Thanks again
--vk
 

Am 07.06.2014 um 17:46 schrieb Torbjörn Granlund:

> Triggered by your inquiry, we have analysed the stack usage of GMP 6.0.
> 
> It turned out that two allocation points (both in mpn/generic/mul.c)
> made oversized stack allocations.  The result is that GMP could use at
> least 1152 KiB of total stack.
> 
> I've patched the repositories for GMP 6.0 as well as the mainline.  Here
> is the patch: https://gmplib.org/repo/gmp-6.0/raw-rev/84965a50fd92
> 
> With this patch applied, GMP's test suite uses less than 496 KiB.
> Presumably this is a good figure for the maximal GMP use.
> 
> (According to Apple's documentation, the pthreads default stack size is
> 512 KiB, as David Harvey experienced.  "Carbon MPTasks", whatever that
> might be, default to just 4 KiB.  Ref:
> https://developer.apple.com/library/mac/qa/qa1419/_index.html)
> 
> 
> Torbjörn
> Please encrypt, key id 0xC8601622
> _______________________________________________
> gmp-discuss mailing list
> gmp-discuss at gmplib.org
> https://gmplib.org/mailman/listinfo/gmp-discuss

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: measure2.txt
URL: <https://gmplib.org/list-archives/gmp-discuss/attachments/20140607/4c2f17ce/attachment.txt>


More information about the gmp-discuss mailing list