Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.85k stars 527 forks source link

Leak in MLDBM under Linux #80

Closed p5pRT closed 20 years ago

p5pRT commented 24 years ago

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

Searchable as RT883$

p5pRT commented 24 years ago

From modus@ns.asimov.net

----------------------------------------------------------------- The following code leaks fairly severely on every Linux system I've tried it on\, running various releases of 5.004 and 5.005. It does not appear to leak under Solaris x86 or sparc. I have not been ableto try other operating systems. Gurusamy Sarathy asked me to send this using perlbug\, since it looks to be a problem with perl internals.

The offending code​:

#!/usr/bin/perl -w

use MLDBM qw(DB_File); use Fcntl; use strict;

my %in;

tie %in\, 'MLDBM'\, 'testmldbm'\, O_CREAT|O_RDWR\, 0640 || die $1; $in{'1'} = 'a' x 4082; # On the systems that I tested\, this stops leaking if   # changed to 4081. This number _may_ be system   # dependant. untie %in;

while(1) {   tie %in\, 'MLDBM'\, 'testmldbm'\, O_RDONLY\, 0640 || die $1;   my $mem = $in{'1'};   untie %in; }

Perl Info ``` This perlbug was built using Perl 5.00503 - Mon Jun 14 09:34:26 PDT 1999 It is being executed now by Perl 5.00503 - Mon Jun 14 22:53:23 PDT 1999. Site configuration information for perl 5.00503: Configured by modus at Mon Jun 14 22:53:23 PDT 1999. Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration: Platform: osname=linux, osvers=2.2.5-22smp, archname=i386-linux uname='linux hq 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='-g', gccversion=2.7.2.3 cppflags='-Dbool=char -DHAS_BOOL -DDEBUGGING' ccflags ='-Dbool=char -DHAS_BOOL -DDEBUGGING' stdchar='char', d_stdstdio=define, 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 -lndbm -lgdbm -ldb -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/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=/home/modus LANG (unset) LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/usr/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/modus/bin PERL_BADLANG (unset) SHELL=/bin/bash ```
p5pRT commented 23 years ago

From [Unknown Contact. See original ticket]

does not leak when tested anymore on similar systems. (probably fixed in MLDBM) clsoed

p5pRT commented 20 years ago

From The RT System itself

does not leak when tested anymore on similar systems. (probably fixed in MLDBM) clsoed