]> git.pld-linux.org Git - packages/perl-rpm-build-perl.git/blob - perl-rpm-build-perl-non-deterministic-failures.patch
- rediffed non-deterministic-failures patch, updated macros
[packages/perl-rpm-build-perl.git] / perl-rpm-build-perl-non-deterministic-failures.patch
1 From 428c3feac1e9c39f966cc66c36cc3881d202177c Mon Sep 17 00:00:00 2001
2 From: Niko Tyni <ntyni@debian.org>
3 Date: Sat, 18 May 2013 09:41:47 +0300
4 Subject: [PATCH] Fix non-deterministic failures on newer perls
5
6 The hash randomization changes in the Perl 5.17 series
7 made perl.req to occasionally fail to report the dependencies.
8
9 Improved diagnostics report
10
11  Use of each() on hash after insertion without resetting hash
12  iterator results in undefined behavior, Perl interpreter: 0x9e7010 at
13  /home/niko/tmp/libb-perlreq-perl-0.82/blib/lib/B/Walker.pm line 122.
14
15 so use keys() instead of each(), as suggested by perldiag.pod.
16 ---
17  lib/B/Walker.pm |    2 +-
18  1 file changed, 1 insertion(+), 1 deletion(-)
19
20 diff --git a/lib/B/Walker.pm b/lib/B/Walker.pm
21 index b71f204..f626043 100644
22 --- a/lib/B/Walker.pm
23 +++ b/lib/B/Walker.pm
24 @@ -126,7 +126,7 @@ sub walk_gv ($) {
25  sub walk_stash ($$);
26  sub walk_stash ($$) { # similar to B::walksymtable
27         my ($symref, $prefix) = @_;
28 -       while (my ($sym) = each %$symref) {
29 +       for my $sym (keys %$symref) {
30                 no strict 'refs';
31                 my $fullname = "*main::". $prefix . $sym;
32                 if ($sym =~ /::\z/) {
This page took 0.131764 seconds and 3 git commands to generate.