Skip Menu |
 

This queue is for tickets about the Scalar-List-Utils CPAN distribution.

Report information
The Basics
Id: 16103
Status: resolved
Priority: 0/
Queue: Scalar-List-Utils

People
Owner: Nobody in particular
Requestors: user2004 [...] bk.ru
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 1.14
  • 1.16
  • 1.17
Fixed in: (no value)



Subject: Memory leak in first()
Download (untitled) / with headers
text/plain 1024b
Distribution name and version: Scalar-List-Utils-1.17 Perl version: v5.8.7 OS: FreeBSD 5.4-RELEASE-p4 i386 Distribution name and version: Scalar-List-Utils-1.13 Perl version: v5.8.4 OS: Linux Knoppix 2.6.11 i686 Code: ------------------------------------------------------------ #!/usr/bin/perl use warnings; use strict; use Devel::Peek; use List::Util qw(first); my @list = (1, 2, 3, 4, 5); my $value = 1; print "BEFORE:\n---------------\n"; Dump($value); my $foo = first { $_ > $value } @list; print "AFTER:\n---------------\n"; Dump($value); ------------------------------------------------------------ Output: ------------------------------------------------------------ BEFORE: --------------- SV = IV(0x8076880) at 0x8057bf8 REFCNT = 1 FLAGS = (PADBUSY,PADMY,IOK,pIOK) IV = 1 AFTER: --------------- SV = IV(0x8076880) at 0x8057bf8 REFCNT = 2 FLAGS = (PADBUSY,PADMY,IOK,pIOK) IV = 1 ------------------------------------------------------------ REFCNT changed from 1 to 2. It's a bug, I mean.


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.