Bug#818476: libgmp10: GMP is limited to 32-bit size on a 64-bit machine: failure in mpz_realloc2
Vincent Lefevre
vincent at vinc17.net
Thu Mar 17 12:56:38 UTC 2016
Package: libgmp10
Version: 2:6.1.0+dfsg-2
Severity: normal
Tags: upstream
Consider:
#include <stdio.h>
#include <gmp.h>
int main (void)
{
mpz_t u;
int i;
mpz_init (u);
for (i = 30; i <= 40; i++)
{
printf ("i = %d\n", i);
mpz_realloc2 (u, 1UL << i);
}
mpz_clear (u);
return 0;
}
cventin:~> gcc tst.c -o tst -lgmp
cventin:~> ./tst
i = 30
i = 31
i = 32
i = 33
i = 34
i = 35
i = 36
i = 37
gmp: overflow in mpz type
Not sure whether this has now been fixed upstream, but a discussion
suggests that LP64 like here is fine, so that there shouldn't be
such a limit.
-- System Information:
Debian Release: stretch/sid
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'stable-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.4.0-1-amd64 (SMP w/12 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages libgmp10:amd64 depends on:
ii libc6 2.22-3
libgmp10:amd64 recommends no packages.
libgmp10:amd64 suggests no packages.
-- no debconf information
More information about the debian-science-maintainers
mailing list