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

Memory leak with break-on-regexp condition #2331

Closed
p5pRT opened this issue Aug 7, 2000 · 2 comments
Closed

Memory leak with break-on-regexp condition #2331

p5pRT opened this issue Aug 7, 2000 · 2 comments

Comments

@p5pRT
Copy link

p5pRT commented Aug 7, 2000

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

Searchable as RT3655$

@p5pRT
Copy link
Author

p5pRT commented Aug 7, 2000

From rlm@raggy.doubledogmusic.com

Created by rlm@scareduck.com

Whenever I use perl -d and install a breakpoint which does a
conditional break on a regular expression, I get a severe
memory leak. Following is a minimal test case​:

-----
#!/usr/bin/perl

open(YES,"yes|");

#
# do forever
#
while (<YES>)
{
  my(@​y) = split(/\s+/);
  $foo = $yes;
}
-----

Run this as perl -d, and type 'b 11 $foo =~ /JFDKFDJ/'.

If you're running Linux with the /proc filesystem enabled, you can see
the memory leak in progress by finding the process id, then typing

  cd /proc/<pid>
  while true; do
  clear
  grep Vm status
  sleep 1
  done

Perl Info


Site configuration information for perl 5.00503:

Configured by root at Wed Feb  2 15:34:50 EST 2000.

Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
  Platform:
    osname=linux, osvers=2.2.5-22smp, archname=i386-linux
    uname='linux porky.devel.redhat.com 2.2.5-22smp #1 smp wed jun 2 09:11:51 edt 1999 i686 unknown '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
    cc='cc', optimize='-O2 -m486 -fno-strength-reduce', gccversion=egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
    cppflags='-Dbool=char -DHAS_BOOL -I/usr/local/include'
    ccflags ='-Dbool=char -DHAS_BOOL -I/usr/local/include'
    stdchar='char', d_stdstdio=undef, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -ldl -lm -lc -lposix -lcrypt
    libc=, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
    


@INC for perl 5.00503:
    /usr/home/rlm/src/perls
    /usr/lib/perl5/5.00503/i386-linux
    /usr/lib/perl5/5.00503
    /usr/lib/perl5/site_perl/5.005/i386-linux
    /usr/lib/perl5/site_perl/5.005
    .


Environment for perl 5.00503:
    HOME=/usr/home/rlm
    LANG=en_US
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/usr/bin:/bin:/usr/X11R6/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/home/rlm/src/perls
    PERL5LIB=/usr/home/rlm/src/perls
    PERL_BADLANG (unset)
    SHELL=/bin/bash


@p5pRT
Copy link
Author

p5pRT commented Aug 8, 2000

From [Unknown Contact. See original ticket]

Rob McMillin <rlm@​raggy.doubledogmusic.com> wrote

Whenever I use perl -d and install a breakpoint which does a
conditional break on a regular expression, I get a severe
memory leak. Following is a minimal test case​:

Great minds think alike. Or some other proverb.

I had also discovered this bug and posted a fix yesterday.

So this should be fixed in Perl 5.6.1. If you need a patch sooner,
mail me and I'll send one suitable for perl5.005_03.

Thankyou for the bug report.

Oh, and your test case wasn't minimal - mine was only 3 lines. :-)

Mike Guy

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