Skip Menu |
 

This queue is for tickets about the Math-BigInt CPAN distribution.

Report information
The Basics
Id: 33578
Status: resolved
Worked: 22 min
Priority: 0/
Queue: Math-BigInt

People
Owner: TELS [...] cpan.org
Requestors: PMW-Pause [...] gamewood.net
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in:
  • 1.82
  • 1.83
  • 1.84
  • 1.85
  • 1.86
  • 1.87
Fixed in: (no value)



Subject: from_hex/from_bin/from_oct seem broken?
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Type: text/plain
Charset: utf8
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 485
Download (untitled) / with headers
text/plain 485b
Trying to use from_bin or from_hex in ActiveState Perl 5.8.8 build 822 on Windows XP and it is always returning NaN. Examining code seems to show a number of issues, puzzling is double strip underscores code and weird way it is done. Main issue seems to be not handling $self when getting arguments in internal __from_hex and __from_bin. from_oct appears to be seriously broken as well, using hex patterns in strip underscore expression and decimal pattern when testing validity.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Charset: utf8
Message-Id: <rt-3.6.HEAD-14676-1204065741-295.33578-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 671
Download (untitled) / with headers
text/plain 671b
On Mon Feb 25 23:05:01 2008, WILSONPM wrote: Show quoted text
> Trying to use from_bin or from_hex in ActiveState Perl 5.8.8 build 822 > on Windows XP and it is always returning NaN. > > Examining code seems to show a number of issues, puzzling is double > strip underscores code and weird way it is done. > > Main issue seems to be not handling $self when getting arguments in > internal __from_hex and __from_bin. > > from_oct appears to be seriously broken as well, using hex patterns in > strip underscore expression and decimal pattern when testing validity.
Is this v1.82 of Math::BigInt? If so, can you please try the latest CPAN release (which should be v1.87). Thank you!
MIME-Version: 1.0
In-Reply-To: <rt-3.6.HEAD-14676-1204065741-295.33578-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Charset: utf8
References: <rt-3.6.HEAD-14676-1204065741-295.33578-0-0 [...] rt.cpan.org>
Message-Id: <rt-3.6.HEAD-14693-1204067511-1578.33578-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Content-Transfer-Encoding: binary
From: PMW-Pause [...] gamewood.net
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 430
Download (untitled) / with headers
text/plain 430b
On Tue Feb 26 17:42:21 2008, TELS wrote: Show quoted text
> > Is this v1.82 of Math::BigInt? If so, can you please try the latest CPAN > release (which should be v1.87). Thank you! >
Checking the source for 1.87 on CPAN, the code appears identical and the same issues should be there. It is obvious that the from_oct code is incorrect and I was unable to get the same code in 1.82 to work for from_hex or from_bin without patching the source.
MIME-Version: 1.0
In-Reply-To: <rt-3.6.HEAD-14693-1204067511-1578.33578-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Charset: utf8
References: <rt-3.6.HEAD-14676-1204065741-295.33578-0-0 [...] rt.cpan.org> <rt-3.6.HEAD-14693-1204067511-1578.33578-0-0 [...] rt.cpan.org>
Message-Id: <rt-3.6.HEAD-8347-1206741288-1275.33578-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 568
Download (untitled) / with headers
text/plain 568b
On Tue Feb 26 18:11:51 2008, WILSONPM wrote: Show quoted text
> On Tue Feb 26 17:42:21 2008, TELS wrote:
> > > > Is this v1.82 of Math::BigInt? If so, can you please try the latest CPAN > > release (which should be v1.87). Thank you! > >
> > > Checking the source for 1.87 on CPAN, the code appears identical and the > same issues should be there. It is obvious that the from_oct code is > incorrect and I was unable to get the same code in 1.82 to work for > from_hex or from_bin without patching the source.
This is fixed in the upcoming release of v1.88 - sorry for the delay!
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Charset: utf8
Message-Id: <rt-3.6.HEAD-24871-1207408409-963.33578-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 135
Download (untitled) / with headers
text/plain 135b
I just released v1.88 of Math::BigInt to CPAN, this should resolve your issue. If it doesn't, please reply to re-open the bug report ;)


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.