Bug 1412052 - perl Math::BigInt regression in ignoring white space with non-decimal numbers
Summary: perl Math::BigInt regression in ignoring white space with non-decimal numbers
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: perl-Math-BigInt
Version: 24
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Petr Pisar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-11 04:48 UTC by Stewart Smith
Modified: 2017-01-20 18:18 UTC (History)
2 users (show)

Fixed In Version: perl-Math-BigInt-1.9998.08-1.fc26 perl-Math-BigInt-1.9997.27-2.fc25 perl-Math-BigInt-1.9997.15-3.fc24
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-14 03:51:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Proposed fix (5.14 KB, patch)
2017-01-11 08:31 UTC, Petr Pisar
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
CPAN 119805 0 None None None 2017-01-11 08:35:19 UTC

Description Stewart Smith 2017-01-11 04:48:07 UTC
Description of problem:
The Math::BigInt manual states that leading and trailing whitespace is
ignored, and in fact this has been the behaviour for many years.

However, in recent Math::BigInt (that has shipped in Linux
distributions... e.g. Fedora 25), this behaviour is broken, which breaks
our tools that rely on this.

With Math::BigInt 1.999727:

'use Math::BigInt; print Dumper(Math::BigInt->new("0x10\n\t\t\t"));';
$VAR1 = bless( {
		 'sign' => 'NaN',
		 'value' => [
			      0
			    ]
	       }, 'Math::BigInt' );

With Math::BigInt 1.9993:
'use Math::BigInt; print Dumper(Math::BigInt->new("0x10\n\t\t\t"));';
$VAR1 = bless( {
		 'sign' => '+',
		 'value' => [
			      16
			    ]
	       }, 'Math::BigInt' );

The first version to exhibit this buggy behaviour was 1.999712, with
1.999710 and 1.9997_11 both not having the bug. All versions after
1.999712, including the latest, 1.999807 exhibit the bug.

Version-Release number of selected component (if applicable):
perl-Math-BigInt-1.9997.27-1.fc25.noarch

How reproducible:
100%

Steps to Reproduce:
1. Math::BigInt->new("0x10\n\t\t\t")

Actual results:
print Dumper(Math::BigInt->new("0x10\n\t\t\t"));';
$VAR1 = bless( {
		 'sign' => 'NaN',
		 'value' => [
			      0
			    ]
	       }, 'Math::BigInt' );

Expected results:
'use Math::BigInt; print Dumper(Math::BigInt->new("0x10\n\t\t\t"));';
$VAR1 = bless( {
		 'sign' => '+',
		 'value' => [
			      16
			    ]
	       }, 'Math::BigInt' );

Additional info:

I've reported this upstream, so I'm largely filing this as a Fedora bug so that it's tracked for Fedora - as this means you cannot compile OpenPOWER firmware on Fedora 25.

Comment 1 Petr Pisar 2017-01-11 07:13:24 UTC
You are right. But I cannot find the report at upstream <https://rt.cpan.org/Public/Dist/Display.html?Name=Math-BigInt>. Can you point me to your upstream bug report?

Comment 2 Petr Pisar 2017-01-11 08:31:48 UTC
Created attachment 1239362 [details]
Proposed fix

Comment 3 Petr Pisar 2017-01-11 08:35:19 UTC
I found you upstream bug now. I posted the fix there.

Comment 4 Petr Pisar 2017-01-12 09:00:52 UTC
Upstream accepted the fix with different tests.

Comment 5 Fedora Update System 2017-01-12 09:44:04 UTC
perl-Math-BigInt-1.9997.27-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-3384698335

Comment 6 Fedora Update System 2017-01-12 09:46:57 UTC
perl-Math-BigInt-1.9997.15-3.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-6fdbd25659

Comment 7 Fedora Update System 2017-01-13 08:26:27 UTC
perl-Math-BigInt-1.9997.15-3.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-6fdbd25659

Comment 8 Fedora Update System 2017-01-13 08:31:48 UTC
perl-Math-BigInt-1.9997.27-2.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-3384698335

Comment 9 Fedora Update System 2017-01-14 03:51:40 UTC
perl-Math-BigInt-1.9997.27-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2017-01-20 18:18:47 UTC
perl-Math-BigInt-1.9997.15-3.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.