Skip Menu |
 

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

Report information
The Basics
Id: 120240
Status: resolved
Priority: 0/
Queue: Math-BigInt

People
Owner: Nobody in particular
Requestors: Stefan.Welscher [...] telekom.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.999810



CC: <bug-bignum [...] rt.cpan.org>
Subject: Warnings from BigInt.pm: Use of uninitiated value
Date: Tue, 14 Feb 2017 12:42:10 +0000
To: <bug-Math-BigInt [...] rt.cpan.org>
From: <Stefan.Welscher [...] telekom.de>
Download (untitled) / with headers
text/plain 681b
Hello there, I get the following warnings from my scripts after updating Math::BigInt (1.999809): Use of uninitialized value in string eq at /usr/lib/perl5/5.10.0/Math/BigInt.pm line 1527, <LIST> line 34. Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/5.10.0/Math/BigInt.pm line 1536, <LIST> line 34. Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/5.10.0/Math/BigInt.pm line 1525, <LIST> line 34. Math::BigInt is used by bigint (0.47) in this case. http://search.cpan.org/~pjacklam/bignum-0.47/lib/bigint.pm It looks like $x->{sign} on badd is the uninitialized value. Can you please check/fix this? Thanks a lot, Stefan Welscher
Download (untitled) / with headers
text/plain 205b
No changes were made to badd() in version 1.999809, so I suspect this problem is related to an earlier version. Anyway, there isn't much I can do unless you provide some code so I can reproduce the error.
Subject: AW: [rt.cpan.org #120240] Warnings from BigInt.pm: Use of uninitiated value
Date: Tue, 14 Feb 2017 16:42:24 +0000
To: <bug-Math-BigInt [...] rt.cpan.org>
From: <Stefan.Welscher [...] telekom.de>
Download (untitled) / with headers
text/plain 2.1k
Hello Peter, I made some test code showing the issue: #!/usr/bin/perl use bigint; use strict; my %testhash = (); my @testarray = (); my $testscalar; print "\nDEBUG:Test hash:\n"; $testhash{test}+=3; print "\nDEBUG:Test array:\n"; $testarray[1]+=3; print "\nDEBUG:Test scalar:\n"; $testscalar+=3; print "FIN\n"; Show quoted text
_____________________________________________________________________________________________________________ Rose:/opt/perl # perl test_bigint.pl DEBUG:Test hash: Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1525. Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1527. Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1536. DEBUG:Test array: Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1525. Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1527. Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1536. DEBUG:Test scalar: Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1525. Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1527. Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1536. FIN
_____________________________________________________________________________________________________________ Thanks/Regards, Stefan Welscher
-----Ursprüngliche Nachricht----- Von: Peter John Acklam via RT [mailto:bug-Math-BigInt@rt.cpan.org] Gesendet: Dienstag, 14. Februar 2017 15:50 An: Welscher, Stefan Betreff: [rt.cpan.org #120240] Warnings from BigInt.pm: Use of uninitiated value <URL: https://rt.cpan.org/Ticket/Display.html?id=120240 > No changes were made to badd() in version 1.999809, so I suspect this problem is related to an earlier version. Anyway, there isn't much I can do unless you provide some code so I can reproduce the error.
Download (untitled) / with headers
text/plain 1021b
I have run your program with every combination of Math::BigInt, Math::BigInt::Lite, and bignum that I have installed on my system, and I am not able to reproduce what you are seeing. I tried each version of Math::BigInt from version 1.999701 to version 1.999809 with each version of Math::BigInt::Lite from version 0.03 to version 0.16 with each version of bignum from version 0.05 to 0.47. Perhaps you can run the following script and show me the output. The program displays the name and version of every module that is loaded when the program runs. #!/usr/bin/perl use strict; use warnings; use bigint; printf "%20s %s\n", "Perl", $]; for my $file (sort keys %INC) { my $mod = $file; $mod =~ s|\.pm$||; $mod =~ s|/|::|g; printf "%20s %s\n", $mod, $mod -> VERSION() // 'undef'; } my %testhash = (); my @testarray = (); my $testscalar; print "\nDEBUG:Test hash:\n"; $testhash{test}+=3; print "\nDEBUG:Test array:\n"; $testarray[1]+=3; print "\nDEBUG:Test scalar:\n"; $testscalar+=3; print "FIN\n";
Subject: AW: [rt.cpan.org #120240] Warnings from BigInt.pm: Use of uninitiated value
Date: Tue, 21 Feb 2017 15:13:34 +0000
To: <bug-Math-BigInt [...] rt.cpan.org>
From: <Stefan.Welscher [...] telekom.de>
Download (untitled) / with headers
text/plain 7.7k
Hello Peter, thank you for the reply. The output of your addon is as follows: Rose:/opt/perl # perl test_bigint.pl Perl 5.018002 Carp 1.29 Exporter 5.68 Exporter::Heavy 5.68 Math::BigInt 1.999809 Math::BigInt::Calc 1.999809 Math::BigInt::Lib 1.999809 bigint 0.47 constant 1.27 integer 1.00 overload 1.22 overloading 0.02 strict 1.07 vars 1.03 warnings 1.18 warnings::register 1.02 DEBUG:Test hash: Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1525. Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1527. Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1536. DEBUG:Test array: Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1525. Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1527. Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1536. DEBUG:Test scalar: Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1525. Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1527. Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1536. FIN This output was created on a test system. On production environment, we deactivated "use warnings" in BigInt.pm to get rid of the warnings (we couldn't find a way for a quick rollback). The modules loaded with the test script are: Perl 5.010000 Carp 1.38 Exporter 5.72 Exporter::Heavy 5.72 Math::BigInt 1.999809 Math::BigInt::Calc 1.999809 Math::BigInt::Lib 1.999809 bigint 0.47 constant 1.33 integer 1.00 overload 1.06 strict 1.04 warnings 1.06 warnings::register 1.01 But today we also had a crash on the production script more or less caused by the BigInt-Module: " Can't call method "is_zero" on an undefined value at /usr/lib/perl5/5.10.0/Math/BigInt.pm line 1578." Because this error happens in the middle of >130.000 lines of code I was not yet able to specify a line causing it. On the production script, the following modules are loaded (I had to skip the Version method, because I got 'Can't call method "VERSION" without a package or object reference'): (I delete our own modules from the output) Perl 5.010000 ::usr::lib::perl5::5.10.0::x86_64-linux-thread-multi::auto::POSIX::autosplit.ix ::usr::lib::perl5::5.10.0::x86_64-linux-thread-multi::auto::POSIX::load_imports.al ::usr::lib::perl5::vendor_perl::5.10.0::x86_64-linux-thread-multi::auto::Net::SSLeay::autosplit.ix ::usr::lib::perl5::vendor_perl::5.10.0::x86_64-linux-thread-multi::auto::Net::SSLeay::randomize.al Algorithm::Diff Archive::Zip Archive::Zip::Archive Archive::Zip::DirectoryMember Archive::Zip::FileMember Archive::Zip::Member Archive::Zip::NewFileMember Archive::Zip::StringMember Archive::Zip::ZipFileMember AutoLoader Carp Carp::Heavy Compress::Raw::Bzip2 Compress::Raw::Zlib Config Config_heavy.pl Convert Cwd DBI Data::Dumper DynaLoader Encode Encode::Alias Encode::Config Encode::Encoding Errno Excel::Writer::XLSX Excel::Writer::XLSX::Chart Excel::Writer::XLSX::Chartsheet Excel::Writer::XLSX::Drawing Excel::Writer::XLSX::Format Excel::Writer::XLSX::Package::App Excel::Writer::XLSX::Package::Comments Excel::Writer::XLSX::Package::ContentTypes Excel::Writer::XLSX::Package::Core Excel::Writer::XLSX::Package::Custom Excel::Writer::XLSX::Package::Packager Excel::Writer::XLSX::Package::Relationships Excel::Writer::XLSX::Package::SharedStrings Excel::Writer::XLSX::Package::Styles Excel::Writer::XLSX::Package::Table Excel::Writer::XLSX::Package::Theme Excel::Writer::XLSX::Package::VML Excel::Writer::XLSX::Package::XMLwriter Excel::Writer::XLSX::Shape Excel::Writer::XLSX::Utility Excel::Writer::XLSX::Workbook Excel::Writer::XLSX::Worksheet Expect Exporter Exporter::Heavy Fcntl File::Basename File::Copy File::Find File::Glob File::GlobMapper File::Path File::Spec File::Spec::Unix File::Temp FileHandle IO IO::Compress::Adapter::Bzip2 IO::Compress::Adapter::Deflate IO::Compress::Adapter::Identity IO::Compress::Base IO::Compress::Base::Common IO::Compress::Bzip2 IO::Compress::Gzip::Constants IO::Compress::RawDeflate IO::Compress::Zip IO::Compress::Zip::Constants IO::Compress::Zlib::Extra IO::File IO::Handle IO::Pty IO::Seekable IO::Select IO::Socket IO::Socket::INET IO::Socket::INET6 IO::Socket::SSL IO::Socket::UNIX IO::Stty IO::Tty IO::Tty::Constant List::Util MIME::Base64 Math::BigInt Math::BigInt::Calc Math::BigInt::Lib Net::DNS Net::DNS::Domain Net::DNS::DomainName Net::DNS::Header Net::DNS::Packet Net::DNS::Parameters Net::DNS::Question Net::DNS::RR Net::DNS::Resolver Net::DNS::Resolver::Base Net::DNS::Resolver::UNIX Net::DNS::Update Net::SSLeay POSIX Scalar::Util SelectSaver Socket Socket6 Symbol Text::Diff Tie::Hash Time::Local WWW::Curl WWW::Curl::Easy XSLoader autouse base bigint bytes constant integer lib overload parent re strict utf8 vars warnings warnings::register I hope this helps you on debugging. Thanks/regards, Stefan Welscher Show quoted text
-----Ursprüngliche Nachricht----- Von: Peter John Acklam via RT [mailto:bug-Math-BigInt@rt.cpan.org] Gesendet: Dienstag, 21. Februar 2017 14:41 An: Welscher, Stefan Betreff: [rt.cpan.org #120240] Warnings from BigInt.pm: Use of uninitiated value <URL: https://rt.cpan.org/Ticket/Display.html?id=120240 > I have run your program with every combination of Math::BigInt, Math::BigInt::Lite, and bignum that I have installed on my system, and I am not able to reproduce what you are seeing. I tried each version of Math::BigInt from version 1.999701 to version 1.999809 with each version of Math::BigInt::Lite from version 0.03 to version 0.16 with each version of bignum from version 0.05 to 0.47. Perhaps you can run the following script and show me the output. The program displays the name and version of every module that is loaded when the program runs. #!/usr/bin/perl use strict; use warnings; use bigint; printf "%20s %s\n", "Perl", $]; for my $file (sort keys %INC) { my $mod = $file; $mod =~ s|\.pm$||; $mod =~ s|/|::|g; printf "%20s %s\n", $mod, $mod -> VERSION() // 'undef'; } my %testhash = (); my @testarray = (); my $testscalar; print "\nDEBUG:Test hash:\n"; $testhash{test}+=3; print "\nDEBUG:Test array:\n"; $testarray[1]+=3; print "\nDEBUG:Test scalar:\n"; $testscalar+=3; print "FIN\n";
Subject: AW: [rt.cpan.org #120240] Warnings from BigInt.pm: Use of uninitiated value
Date: Tue, 21 Feb 2017 16:51:47 +0000
To: <bug-Math-BigInt [...] rt.cpan.org>
From: <Stefan.Welscher [...] telekom.de>
Download (untitled) / with headers
text/plain 11.6k
Hello Peter, I found the line on which the production script crashed today. It's basically, when the second parameter of a calculation is not initiated: #!/usr/bin/perl use bigint; use strict; use warnings; printf "%20s %s\n", "Perl", $]; for my $file (sort keys %INC) { my $mod = $file; $mod =~ s|\.pm$||; $mod =~ s|/|::|g; printf "%20s %s\n", $mod, $mod -> VERSION() // 'undef'; } my %testhash = (); my @testarray = (); my $testscalar; print "\nDEBUG:Addition:\n--------------\n"; print "\nDEBUG:Test hash:\n"; $testhash{test}+=3; print "\nDEBUG:Test array:\n"; $testarray[1]+=3; print "\nDEBUG:Test scalar:\n"; $testscalar+=3; my $testscalar2; print "\nDEBUG:Substraction:\n--------------\n"; print "\nDEBUG:Test scalar: ".(1-$testscalar2)."\n"; my $testscalar3; print "\nDEBUG:Multiplication:\n--------------\n"; print "\nDEBUG:Test scalar: ".(1*$testscalar3)."\n"; my $testscalar4; print "\nDEBUG:Division:\n--------------\n"; print "\nDEBUG:Test scalar: ".(1/$testscalar4)."\n"; print "FIN\n"; Output of the script (concatenated, because of the crashes): Rose:/opt/perl # perl test_bigint.pl Perl 5.018002 Carp 1.29 Exporter 5.68 Exporter::Heavy 5.68 Math::BigInt 1.999809 Math::BigInt::Calc 1.999809 Math::BigInt::Lib 1.999809 bigint 0.47 constant 1.27 integer 1.00 overload 1.22 overloading 0.02 strict 1.07 vars 1.03 warnings 1.18 warnings::register 1.02 DEBUG:Addition: -------------- DEBUG:Test hash: Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1525. Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1527. Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1536. DEBUG:Test array: Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1525. Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1527. Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1536. DEBUG:Test scalar: Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1525. Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1527. Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1536. DEBUG:Substraction: -------------- Can't call method "is_zero" on an undefined value at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1578. DEBUG:Multiplication: -------------- Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1609. Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1612. Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1627. Can't use an undefined value as an ARRAY reference at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt/Calc.pm line 483. DEBUG:Division: -------------- Can't call method "is_nan" on an undefined value at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1716. Of course division by undefined/zero will always cause an error, so this surely is the least critical one. But with only that error given it is very hard to find the corresponding line on large scripts. Thanks/regards, Stefan Welscher Show quoted text
-----Ursprüngliche Nachricht----- Von: Welscher, Stefan Gesendet: Dienstag, 21. Februar 2017 16:14 An: 'bug-Math-BigInt@rt.cpan.org' Betreff: AW: [rt.cpan.org #120240] Warnings from BigInt.pm: Use of uninitiated value Hello Peter, thank you for the reply. The output of your addon is as follows: Rose:/opt/perl # perl test_bigint.pl Perl 5.018002 Carp 1.29 Exporter 5.68 Exporter::Heavy 5.68 Math::BigInt 1.999809 Math::BigInt::Calc 1.999809 Math::BigInt::Lib 1.999809 bigint 0.47 constant 1.27 integer 1.00 overload 1.22 overloading 0.02 strict 1.07 vars 1.03 warnings 1.18 warnings::register 1.02 DEBUG:Test hash: Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1525. Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1527. Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1536. DEBUG:Test array: Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1525. Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1527. Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1536. DEBUG:Test scalar: Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1525. Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1527. Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.18.2/Math/BigInt.pm line 1536. FIN This output was created on a test system. On production environment, we deactivated "use warnings" in BigInt.pm to get rid of the warnings (we couldn't find a way for a quick rollback). The modules loaded with the test script are: Perl 5.010000 Carp 1.38 Exporter 5.72 Exporter::Heavy 5.72 Math::BigInt 1.999809 Math::BigInt::Calc 1.999809 Math::BigInt::Lib 1.999809 bigint 0.47 constant 1.33 integer 1.00 overload 1.06 strict 1.04 warnings 1.06 warnings::register 1.01 But today we also had a crash on the production script more or less caused by the BigInt-Module: " Can't call method "is_zero" on an undefined value at /usr/lib/perl5/5.10.0/Math/BigInt.pm line 1578." Because this error happens in the middle of >130.000 lines of code I was not yet able to specify a line causing it. On the production script, the following modules are loaded (I had to skip the Version method, because I got 'Can't call method "VERSION" without a package or object reference'): (I delete our own modules from the output) Perl 5.010000 ::usr::lib::perl5::5.10.0::x86_64-linux-thread-multi::auto::POSIX::autosplit.ix ::usr::lib::perl5::5.10.0::x86_64-linux-thread-multi::auto::POSIX::load_imports.al ::usr::lib::perl5::vendor_perl::5.10.0::x86_64-linux-thread-multi::auto::Net::SSLeay::autosplit.ix ::usr::lib::perl5::vendor_perl::5.10.0::x86_64-linux-thread-multi::auto::Net::SSLeay::randomize.al Algorithm::Diff Archive::Zip Archive::Zip::Archive Archive::Zip::DirectoryMember Archive::Zip::FileMember Archive::Zip::Member Archive::Zip::NewFileMember Archive::Zip::StringMember Archive::Zip::ZipFileMember AutoLoader Carp Carp::Heavy Compress::Raw::Bzip2 Compress::Raw::Zlib Config Config_heavy.pl Convert Cwd DBI Data::Dumper DynaLoader Encode Encode::Alias Encode::Config Encode::Encoding Errno Excel::Writer::XLSX Excel::Writer::XLSX::Chart Excel::Writer::XLSX::Chartsheet Excel::Writer::XLSX::Drawing Excel::Writer::XLSX::Format Excel::Writer::XLSX::Package::App Excel::Writer::XLSX::Package::Comments Excel::Writer::XLSX::Package::ContentTypes Excel::Writer::XLSX::Package::Core Excel::Writer::XLSX::Package::Custom Excel::Writer::XLSX::Package::Packager Excel::Writer::XLSX::Package::Relationships Excel::Writer::XLSX::Package::SharedStrings Excel::Writer::XLSX::Package::Styles Excel::Writer::XLSX::Package::Table Excel::Writer::XLSX::Package::Theme Excel::Writer::XLSX::Package::VML Excel::Writer::XLSX::Package::XMLwriter Excel::Writer::XLSX::Shape Excel::Writer::XLSX::Utility Excel::Writer::XLSX::Workbook Excel::Writer::XLSX::Worksheet Expect Exporter Exporter::Heavy Fcntl File::Basename File::Copy File::Find File::Glob File::GlobMapper File::Path File::Spec File::Spec::Unix File::Temp FileHandle IO IO::Compress::Adapter::Bzip2 IO::Compress::Adapter::Deflate IO::Compress::Adapter::Identity IO::Compress::Base IO::Compress::Base::Common IO::Compress::Bzip2 IO::Compress::Gzip::Constants IO::Compress::RawDeflate IO::Compress::Zip IO::Compress::Zip::Constants IO::Compress::Zlib::Extra IO::File IO::Handle IO::Pty IO::Seekable IO::Select IO::Socket IO::Socket::INET IO::Socket::INET6 IO::Socket::SSL IO::Socket::UNIX IO::Stty IO::Tty IO::Tty::Constant List::Util MIME::Base64 Math::BigInt Math::BigInt::Calc Math::BigInt::Lib Net::DNS Net::DNS::Domain Net::DNS::DomainName Net::DNS::Header Net::DNS::Packet Net::DNS::Parameters Net::DNS::Question Net::DNS::RR Net::DNS::Resolver Net::DNS::Resolver::Base Net::DNS::Resolver::UNIX Net::DNS::Update Net::SSLeay POSIX Scalar::Util SelectSaver Socket Socket6 Symbol Text::Diff Tie::Hash Time::Local WWW::Curl WWW::Curl::Easy XSLoader autouse base bigint bytes constant integer lib overload parent re strict utf8 vars warnings warnings::register I hope this helps you on debugging. Thanks/regards, Stefan Welscher
-----Ursprüngliche Nachricht----- Von: Peter John Acklam via RT [mailto:bug-Math-BigInt@rt.cpan.org] Gesendet: Dienstag, 21. Februar 2017 14:41 An: Welscher, Stefan Betreff: [rt.cpan.org #120240] Warnings from BigInt.pm: Use of uninitiated value <URL: https://rt.cpan.org/Ticket/Display.html?id=120240 > I have run your program with every combination of Math::BigInt, Math::BigInt::Lite, and bignum that I have installed on my system, and I am not able to reproduce what you are seeing. I tried each version of Math::BigInt from version 1.999701 to version 1.999809 with each version of Math::BigInt::Lite from version 0.03 to version 0.16 with each version of bignum from version 0.05 to 0.47. Perhaps you can run the following script and show me the output. The program displays the name and version of every module that is loaded when the program runs. #!/usr/bin/perl use strict; use warnings; use bigint; printf "%20s %s\n", "Perl", $]; for my $file (sort keys %INC) { my $mod = $file; $mod =~ s|\.pm$||; $mod =~ s|/|::|g; printf "%20s %s\n", $mod, $mod -> VERSION() // 'undef'; } my %testhash = (); my @testarray = (); my $testscalar; print "\nDEBUG:Test hash:\n"; $testhash{test}+=3; print "\nDEBUG:Test array:\n"; $testarray[1]+=3; print "\nDEBUG:Test scalar:\n"; $testscalar+=3; print "FIN\n";
Download (untitled) / with headers
text/plain 545b
Thank you! With the modified version of the script (the one above) I am now able to reproduce the warnings and the crash. That certainly helps me a lot. Using uninitialized values is generally not a good thing, but Perl itself does not crash (it only gives a warning): # Using an uninitialized value in an arithmetic operation gives a warning: $ perl -Mstrict -wle 'my $x; print $x + 2' Use of uninitialized value $x in addition (+) at -e line 1. 2 # The exit status is zero: $ echo $? 0 I will look further into what is causing the crash.
Download (untitled) / with headers
text/plain 323b
This is fixed in v1.999810. However, I strongly recommend that you fix your code so it doesn't use uninitialized variables. When the -w switch or the "use warnings" pragma is used, Perl gives a warning when an uninitialized variable is used. I will likely introduce something similar into the Math::BigInt-related modules.


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.