Package: libmath-bigint-gmp-perl Version: 1.37-1 Severity: normal The program foo.pl below prints
18446744073709551615 - where I expected it to print 18446744073709551615 18446744073709551615 which is what you get from the plain Math::BigInt. Nosing around Math::BigInt::GMP::_new() it looks like if (SvUOK(x)) { mpz_init_set_si(*RETVAL, (UV)SvUV(x)); doesn't take into account that a UV may be bigger than a long in a perl 64-bit bloat build such as debian's 5.12. Maybe (untested) sizeof(UV) <= sizeof(unsigned long) or similar added to the condition. I expect it should be set_ui() not set_si() anyway too.
use Math::BigInt only => 'GMP'; my $n = ~0; my $b = Math::BigInt->new($n); print "$n\n"; print "$b\n";
-- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (990, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.32-5-486 Locale: LANG=en_AU, LC_CTYPE=en_AU (charmap=ISO-8859-1) Shell: /bin/sh linked to /bin/dash Versions of packages libmath-bigint-gmp-perl depends on: ii libc6 2.13-10 ii libgmp10 2:5.0.2+dfsg-1 ii libmath-bigint-perl 1.997-1 ii perl 5.12.4-5 ii perl-base [perlapi-5.12.4] 5.12.4-5 ii perl-modules [libmath-bigint-perl] 5.12.4-5 libmath-bigint-gmp-perl recommends no packages. libmath-bigint-gmp-perl suggests no packages. -- no debconf information