CC: | perl5-porters [...] perl.org |
Subject: | [Patch] Fix hash order dependency bug revealed by 5.17.6 hash randomization |
I have just applied the following patch to the perl core version of this
distribution to fix an edge case bug in List-Util testing that was
revealed by hash order randomization introduced in 5.17.6.
I personally think my test is only a work around as the test will fail
if the environment is empty. I think it would be better to set an
environment variable and then launch a child Perl process to check if it
is tainted.
Anyway, this should fix the intermittent failures we are seeing with
Perl smokes. It bumps the version to 1.25_01.
Please let me know when this or equivalent changes are applied upstream
and please be aware that there is now a "1.25_01" out in the wild that
is not on CPAN.
Ive marked the ticket as "important" as until it is fixed perl core and
CPAN are out of sync.
Thanks a lot and cheers,
Yves
commit 2a5bd8731bfdd9308c12fac06faa637e38b5eeb5
Author: Yves Orton <demerphq@gmail.com>
Date: Wed Nov 21 09:45:06 2012 +0100
fix a hash order dependency in cpan/List-Util tests
cpan/List-Util/t/tainted.t fails if the environment variable
it access is PERL5LIB as that is set inside the process.
We filter out env vars starting with PERL and bump the version
numbers to 1.25_01.
diff --git a/cpan/List-Util/Changes b/cpan/List-Util/Changes
index f737c1d..1fcd9f6 100644
@@ -1,3 +1,8 @@
+1.25_01 -- Wed Nov 21 09:47
+
+ * Fix a hash order dependency bug t/tainted.t
+ (Currently this is a core only version to fix perl5 smokes)
+
1.25 -- Sat Mar 24 13:10:13 UTC 2012
* Restore back-compat. to perl 5.6 (thanks to Zefram)
diff --git a/cpan/List-Util/lib/List/Util.pm b/cpan/List-
Util/lib/List/Util.pm
index 033ef50..c07e2d8 100644
--- a/cpan/List-Util/lib/List/Util.pm
+++ b/cpan/List-Util/lib/List/Util.pm
@@ -13,7 +13,7 @@ require Exporter;
our @ISA = qw(Exporter);
our @EXPORT_OK = qw(first min max minstr maxstr reduce sum shuffle);
-our $VERSION = "1.25";
+our $VERSION = "1.25_01";
our $XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
diff --git a/cpan/List-Util/lib/List/Util/XS.pm b/cpan/List-
Util/lib/List/Util/XS.pm
index d46853c..b196e7d 100644
--- a/cpan/List-Util/lib/List/Util/XS.pm
+++ b/cpan/List-Util/lib/List/Util/XS.pm
@@ -2,7 +2,7 @@ package List::Util::XS;
use strict;
use List::Util;
-our $VERSION = "1.25"; # FIXUP
+our $VERSION = "1.25_01"; # FIXUP
$VERSION = eval $VERSION; # FIXUP
1;
diff --git a/cpan/List-Util/lib/Scalar/Util.pm b/cpan/List-
Util/lib/Scalar/Util.pm
index ab97fe5..4d034fc 100644
--- a/cpan/List-Util/lib/Scalar/Util.pm
+++ b/cpan/List-Util/lib/Scalar/Util.pm
@@ -12,7 +12,7 @@ require List::Util; # List::Util loads the XS
our @ISA = qw(Exporter);
our @EXPORT_OK = qw(blessed dualvar reftype weaken isweak tainted
readonly openhandle refaddr isvstring looks_like_number set_prototype);
-our $VERSION = "1.25";
+our $VERSION = "1.25_01";
$VERSION = eval $VERSION;
our @EXPORT_FAIL;
diff --git a/cpan/List-Util/t/tainted.t b/cpan/List-Util/t/tainted.t
index ab40aa6..8666117 100644
--- a/cpan/List-Util/t/tainted.t
+++ b/cpan/List-Util/t/tainted.t
@@ -26,7 +26,7 @@ my $var = 2;
ok( !tainted($var), 'known variable');
-my $key = (keys %ENV)[0];
+my $key = (grep { !/^PERL/ } keys %ENV)[0];
ok( tainted($ENV{$key}), 'environment variable');