Skip Menu |
 

This queue is for tickets about the IO-Multiplex CPAN distribution.

Report information
The Basics
Id: 5715
Status: resolved
Priority: 0/
Queue: IO-Multiplex

People
Owner: Nobody in particular
Requestors: e1-nf9f-qwx7-fmr0 [...] emailias.com
Cc:
AdminCc:

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



Subject: using freed value in foreach loop
Download (untitled) / with headers
text/plain 888b
IO-Multiplex-1.08 perl 5.8.2 uname -a: SunOS orange 5.8 Generic sun4U sparc SUNW,Ultra-5_10 I get the following error, usually more reproducible when running several connections that close in a similar time frame: Use of freed value in iteration at /usr/local/lib/perl5/site_perl/5.8.2/IO/Multiplex.pm line 721. Line 721 just happens to be the last real statement before the end of the foreach loop at line 594. I don't think there is anything wrong with that line. It looks as if perl is checking for use of freed values in hashes, so it never reaches the "next unless" in line 598 when one of the next handles is removed during the previous loop. If you take a snapshot of the array before the loop, then it seems to work correctly. Add something like the following before line 594: my @handles = values %{$self->{_handles}}; And change line 594 to: foreach my $fh (@handles) {
From: larschri [...] pvv.ntnu.no
This could be caused by the error described in ticket #5885 - there is also a patch for it there.
Correct. Fixed in 1.11 to be released soon.


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.