Skip Menu |
Report information
Id: 114340
Status: resolved
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: tokuhirom <tokuhirom [at] gmail.com>
Cc:
AdminCc:

Operating System: darwin
PatchStatus: (no value)
Severity: medium
Type: core
Perl Version: 5.16.0
Fixed In: (no value)



Subject: Perl 5.16.0 leaks memory
Date: Tue, 31 Jul 2012 17:58:07 +0900
To: perlbug [...] perl.org
From: Tokuhiro Matsuno <tokuhirom [...] gmail.com>
Download (untitled) / with headers
text/plain 4.1k
This is a bug report for perl from tokuhirom@gmail.com, generated with the help of perlbug 1.39 running under perl 5.16.0. ----------------------------------------------------------------- [Please describe your issue here] Following code leaks memory. Show quoted text
>||
use strict; my $kan = bless +{}, 'Kan'; my $code = sub { }; for (1..100) { for (1..1000) { for my $f ($code, $kan) { ref $f; } } my @x = split /\s+/, `ps aux|grep leak.pl|grep -v grep| grep -v vim`; print $x[5], $/; } ||< [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=core severity=medium --- Site configuration information for perl 5.16.0: Configured by tokuhirom at Tue Jul 31 16:58:39 JST 2012. Summary of my perl5 (revision 5 version 16 subversion 0) configuration: Platform: osname=darwin, osvers=11.4.0, archname=darwin-2level uname='darwin imac 11.4.0 darwin kernel version 11.4.0: mon apr 9 19:32:15 pdt 2012; root:xnu-1699.26.8~1release_x86_64 x86_64 i386 imac11,2 darwin ' config_args='-de -Dprefix=/Users/tokuhirom/perl5/perlbrew/perls/perl-5.16.0' hint=recommended, useposix=true, d_sigaction=define useithreads=undef, usemultiplicity=undef useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include', optimize='-O3', cppflags='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include' ccversion='', gccversion='4.2.1 Compatible Apple Clang 3.1 (tags/Apple/clang-318.0.61)', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -fstack-protector -L/usr/local/lib' libpth=/usr/local/lib /usr/lib libs=-lgdbm -ldbm -ldl -lm -lutil -lc perllibs=-ldl -lm -lutil -lc libc=, so=dylib, useshrplib=false, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector' Locally applied patches: --- @INC for perl 5.16.0: /Users/tokuhirom/perl5/lib/perl5//darwin-2level /Users/tokuhirom/perl5/lib/perl5/ /Users/tokuhirom/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/darwin-2level /Users/tokuhirom/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0 /Users/tokuhirom/perl5/perlbrew/perls/perl-5.16.0/lib/5.16.0/darwin-2level /Users/tokuhirom/perl5/perlbrew/perls/perl-5.16.0/lib/5.16.0 . --- Environment for perl 5.16.0: DYLD_LIBRARY_PATH (unset) HOME=/Users/tokuhirom LANG=en_US.UTF-8 LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/usr/local/perl/latest/bin/:/Users/tokuhirom/perl5/perlbrew/bin:/Users/tokuhirom/perl5/perlbrew/perls/perl-5.14.2/bin:/Users/tokuhirom/perl5/bin/:/Users/tokuhirom/dotfiles/local/bin/:/Users/tokuhirom/bin:/Users/tokuhirom/local/bin/:/usr/local/mysql/bin/:/usr/local/bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/perl/latest/bin/:/Users/tokuhirom/perl5/bin/:/Users/tokuhirom/dotfiles/local/bin/:/Users/tokuhirom/bin:/Users/tokuhirom/local/bin/:/usr/local/mysql/bin/:/usr/local/bin/:/Users/tokuhirom/.rvm/bin:/Users/tokuhirom/.rvm/bin PERL5OPT=-Mlib=/Users/tokuhirom/perl5/lib/perl5/ PERLBREW_BASHRC_VERSION=0.42 PERLBREW_HOME=/Users/tokuhirom/.perlbrew PERLBREW_PATH=/Users/tokuhirom/perl5/perlbrew/bin:/Users/tokuhirom/perl5/perlbrew/perls/perl-5.14.2/bin PERLBREW_PERL=perl-5.14.2 PERLBREW_ROOT=/Users/tokuhirom/perl5/perlbrew PERLBREW_VERSION=0.30 PERL_BADLANG (unset) PERL_CPANM_OPT=-nv --no-man-pages -l /Users/tokuhirom/perl5/ SHELL=/bin/zsh
RT-Send-CC: perl5-porters [...] perl.org
Proper patch at https://github.com/mirrors/perl/pull/9 -- Reini Urban
Hi, I fixed a memory leak, amending 70b71ec84. Please review my patch!
Download a.diff
application/octet-stream 746b

Message body not shown because it is not plain text.

RT-Send-CC: perl5-porters [...] perl.org, gfugi [...] cpan.org
Download (untitled) / with headers
text/plain 177b
On Tue Jul 31 07:46:31 2012, GFUJI wrote: Show quoted text
> Hi, I fixed a memory leak, amending 70b71ec84. Please review my patch!
Thank you. Applied as c50bda7c60. -- Father Chrysostomos


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org