Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perl 5.16.0 leaks memory #12309

Closed
p5pRT opened this issue Jul 31, 2012 · 7 comments
Closed

Perl 5.16.0 leaks memory #12309

p5pRT opened this issue Jul 31, 2012 · 7 comments

Comments

@p5pRT
Copy link

p5pRT commented Jul 31, 2012

Migrated from rt.perl.org#114340 (status was 'resolved')

Searchable as RT114340$

@p5pRT
Copy link
Author

p5pRT commented Jul 31, 2012

From @tokuhirom

Created by tokuhirom@gmail.com

Following code leaks memory.

||
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], $/;
}
||<

Perl Info

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

@p5pRT
Copy link
Author

p5pRT commented Jul 31, 2012

From @rurban

Proper patch at https://github.com/mirrors/perl/pull/9
--
Reini Urban

@p5pRT
Copy link
Author

p5pRT commented Jul 31, 2012

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jul 31, 2012

From g.psy.va@gmail.com

Hi, I fixed a memory leak, amending 70b71ec. Please review my patch!

@p5pRT
Copy link
Author

p5pRT commented Jul 31, 2012

From g.psy.va@gmail.com

a.diff

@p5pRT
Copy link
Author

p5pRT commented Aug 1, 2012

From @cpansprout

On Tue Jul 31 07​:46​:31 2012, GFUJI wrote​:

Hi, I fixed a memory leak, amending 70b71ec. Please review my patch!

Thank you. Applied as c50bda7.

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Aug 1, 2012

@cpansprout - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant