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

debugger space leak using conditional breakpoints #662

Closed
p5pRT opened this issue Sep 30, 1999 · 4 comments
Closed

debugger space leak using conditional breakpoints #662

p5pRT opened this issue Sep 30, 1999 · 4 comments

Comments

@p5pRT
Copy link

p5pRT commented Sep 30, 1999

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

Searchable as RT1542$

@p5pRT
Copy link
Author

p5pRT commented Sep 30, 1999

From mjtg@cus.cam.ac.uk

Try

perl -wde 'my $a = 0 for 1..10000000'

Loading DB routines from perl5db.pl version 1.0402
Emacs support available.

Enter h or `h h' for help.

main​::(-e​:1)​: my $a = 0 for 1..10000000
  DB<1> b 1 $a
  DB<2> c

and watch the swap space evaporate (fairly slowly).

Curiously, it doesn't leak if the command line is

  perl -wde 'my $a = 0 while 1'

The effect occurs in both maintenance and development versions, on
several platforms.

BTW the slightly odd 'b 1 $a' is used because the more obvious 'b 1 0'
doesn't work - it gives "always true" instead of "always false".
Dunno if that's a bug or a feature.

Mike Guy

% perl5.005_57 -V
Summary of my perl5 (revision 5.0 version 5 subversion 57) configuration​:
  Platform​:
  osname=sunos, osvers=4.1.3, archname=sun4-sunos
  uname=''
  config_args='-Doptimise='-O' -Uusethreads -dOes -f confug.sh'
  hint=previous, useposix=true, d_sigaction=define
  usethreads=undef useperlio=undef d_sfio=undef
  use64bits=undef usemultiplicity=undef
  Compiler​:
  cc='gcc', optimize='-O', gccversion=2.7.2.3
  cppflags='-I/usr/local/include -DREG_INFTY=22790'
  ccflags ='-I/usr/local/include -DREG_INFTY=22790'
  stdchar='unsigned char', d_stdstdio=define, usevfork=true
  intsize=4, longsize=4, ptrsize=4, doublesize=8
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
  alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries​:
  ld='ld', ldflags =' -L/usr/local/lib'
  libpth=/usr/local/lib /lib /usr/lib /usr/ucblib
  libs=-ldbm -ldl -lm -lc -lposix
  libc=/lib/libc.so.1.8, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
  cccdlflags='-fpic', lddlflags='-assert nodefinitions -L/usr/local/lib'

Characteristics of this binary (from libperl)​:
  Built under sunos
  Compiled at May 27 1999 10​:39​:53
  @​INC​:
  /home/mjtg/perl5.005_57/lib
  /home/mjtg/perl5.005_57/lib
  /home/mjtg/perl5.005_57/lib
  .

@p5pRT
Copy link
Author

p5pRT commented Dec 28, 2000

From [Unknown Contact. See original ticket]

This bug appears to still be valid as of @​8229.

[spp@​belgarion bleadperl]$ ./perl -wde 'my $a = 0 for 1..10000000'
Default die handler restored.

Loading DB routines from perl5db.pl version 1.07
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

main​::(-e​:1)​: my $a = 0 for 1..10000000
  DB<1> b 1 $a
  DB<2> c
main​::(-e​:1)​: my $a = 0 for 1..10000000
  DB<2> q

watch swap space evaporate (fairly slowly).

@p5pRT
Copy link
Author

p5pRT commented Jul 12, 2005

From @schwern

This bug appears to have been resolved somewhere before 5.8.6. The
construct no longer consumes additional memory.

@p5pRT
Copy link
Author

p5pRT commented Jul 12, 2005

@schwern - 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