Skip Menu |

This queue is for tickets about the Crypt-Random CPAN distribution.

Report information
The Basics
Id: 7247
Status: resolved
Priority: 0/
Queue: Crypt-Random

People
Owner: Nobody in particular
Requestors: cxreg [...] pobox.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.23
Fixed in: (no value)



Subject: makerandom_itv hang on perl 5.6.1
In Crypt::Random::makerandom_itv version 1.23, line 94, the int(PARI(2)**$size) appears to return "inf" when $size is 1024 or higher in perl 5.6.1. I haven't verified that it's a perl 5.6.1 issue, however it works as expected in 5.8.4. The impact of this is that calling makerandom_itv with a size of 1024 or higher causes an infinite loop and hangs. (make test in Crypt::Primes exhibits this hang, as does Crypt::RSA making a 2048 bit key) I experienced this problem in both Redhat 7.3 and Debian 3.0 (woody)
This definitely appears to be a bug related to the overloading of int() via Math::Pari. This overload appears to fail on 5.6.1 and thus the int() is perl's internal version which can't handle numbers that big and converts the string to "inf" or "nan" Removing all calls to int() seems to fix the problem (it's a power of 2 anyway, it doesn't seem neccesary)