[libforks-perl] 04/05: New patch forks.diff: Fix "Use of each() on hash ... results in undefined behavior" warnings

Florian Schlichting fsfs at moszumanska.debian.org
Sun Apr 13 19:48:03 UTC 2014


This is an automated email from the git hooks/post-receive script.

fsfs pushed a commit to branch master
in repository libforks-perl.

commit 1c719cdb76a37d3a7cd83fff9f5ed80914946b75
Author: Florian Schlichting <fsfs at debian.org>
Date:   Sun Apr 13 21:42:30 2014 +0200

    New patch forks.diff: Fix "Use of each() on hash ... results in undefined behavior" warnings
---
 debian/patches/forks.diff | 35 +++++++++++++++++++++++++++++++++++
 debian/patches/series     |  1 +
 2 files changed, 36 insertions(+)

diff --git a/debian/patches/forks.diff b/debian/patches/forks.diff
new file mode 100644
index 0000000..2c3af41
--- /dev/null
+++ b/debian/patches/forks.diff
@@ -0,0 +1,35 @@
+Description: fix "Use of each() on hash ..." error
+Bug: https://rt.cpan.org/Public/Bug/Display.html?id=86910
+
+--- blib/lib/forks.pm.orig	2014-04-10 10:49:35.658714115 +0200
++++ blib/lib/forks.pm	2014-04-10 10:53:30.216049421 +0200
+@@ -1587,8 +1587,7 @@ if (DEBUG) {
+  my $clients = keys %WRITE;
+  _log( " ! $clients>>" ) if $clients;
+ }
+-        keys %WRITE if RESET_EACH_ITER;
+-        my $write = (each %WRITE) || '';
++        my $write = keys %WRITE;
+         _update_timedwaiting_idx();
+         $curtime = time();
+         my ($sleep_min) = $write ? (.001) : List::MoreUtils::minmax(
+@@ -1708,10 +1707,9 @@ _log( " =$CLIENT2TID{$client} ".CORE::jo
+ #    Die now
+ #   Fetch the next client to write to
+ 
+-        while ($write) {
++        for $write(keys %WRITE) {
+             unless (defined $WRITE{$write}) {
+                 delete( $WRITE{$write} );
+-                $write = each %WRITE;
+                 next;
+             }
+             my $written =
+@@ -1733,7 +1731,6 @@ _log( " >$CLIENT2TID{$write} $written of
+                 _croak( "Error ".($! ? $! + 0 : '').": Could not write ".(length $WRITE{$write})
+                     ." bytes to $CLIENT2TID{$write}: ".($! ? $! : '') );
+             }
+-            $write = each %WRITE;
+         }
+ my $error = [$select->has_exception( .1 )] if DEBUG;
+ if (DEBUG) { _log( " #$CLIENT2TID{$_} error" ) foreach @$error; }
diff --git a/debian/patches/series b/debian/patches/series
index 8810115..c034e71 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
+forks.diff
 fix-spelling-error-in-manpage.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libforks-perl.git



More information about the Pkg-perl-cvs-commits mailing list