Bug#724320: gmp: x32: sizeof(mp_limb_t)!=sizeof(void*) is not supported by GAP and PARI

Max Horn max at quendi.de
Tue Oct 1 20:32:50 CEST 2013


Hi there,

On 30.09.2013, at 21:39, Torbjorn Granlund wrote:

>  I like to clarify that I see this is purely as a Debian issue.
> 
> And I'd like to clarify that the rest of the world very likely considers
> this invalid pari and gap type size assumption as pari and gap bugs, or
> at least as a pari and gap portability issue.

As a GAP developer, I actually agree, this is a bug in GAP. As such, I would like to see a proper bug report about this directed towards us, so we can think about fixing the issue. As it is, I only noticed this thread here by chance, first time I heard about the problem :-). But perhaps I missed something -- Bill, did you ever report this on GAP support or the GAP tracker?

Anyway, a quick look at our code confirms that. I cannot yet say how much work it will be to fix this, but certainly is something we should eventually do (and I think if done properly, it will actually simplify the code a bit).

How would I set up a test environment for reproducing this? Any quick hints as to how I would compile a "mixed" version of GMP on a 64 bit Debian or Mac OS X 10.7.5 system would be very much appreciated. 


> 
> This problem has several solutions:
> 
> 1. Debian and other systems which support PA2.0N, MIPS n32, X86-64 x32
>   exclude pari and gap from the x32 (sub-)dist.  Or else just bundle
>   plain 32-bit binaries for a ~3-fold performance penalty.
> 2. Debian and other systems which support any of the above ABIs maintain
>   local pari and gap patches to fix the invalid type size assumption.
> 3. The pari and gap teams fix the invalid type size assumption
>   themselves.
> 
> 1 is simplest, 3 would be best, 2 might be hard and unmaintainable.

For what little it may be worth, I agree with that ordering. And if somebody should develop a fix for this issue in GAP, please consider submitting it to upstream, too, we'll be happy to review it. In the meantime, it may take some time till 3 happens.


Cheers,
Max


> 
> (I believe PA2.0N is mostly irrelevant since PA is obsolete and since
> the kernel Linux doesn't support PA2.0.  MIPS n32 is highly relevant,
> though.  And x32 is highly relevant too of course.)
> 
> -- 
> Torbjörn
> _______________________________________________
> gmp-discuss mailing list
> gmp-discuss at gmplib.org
> https://gmplib.org/mailman/listinfo/gmp-discuss

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 235 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://gmplib.org/list-archives/gmp-discuss/attachments/20131001/a7dc1efe/attachment.bin>


More information about the gmp-discuss mailing list