Front page | perl.perl5.porters |
Postings from February 2003
[perl #21322] Closures could leak memory
Thread Next
From:
Vadim Konovalov
Date:
February 20, 2003 14:09
Subject:
[perl #21322] Closures could leak memory
Message ID:
rt-21322-52540.5.75913578718385@bugs6.perl.org
# New Ticket Created by "Vadim Konovalov"
# Please include the string: [perl #21322]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=21322 >
This is a bug report for perl from Administrator@localhost,
generated with the help of perlbug 1.33 running under perl v5.6.1.
-----------------------------------------------------------------
[Please enter your report here]
Following code leaks memory:
my $foo = 'asdf' x 1000;
for (1..900000) {
my $outer_sub = sub {
my $inner_sub = sub { $foo };
}
}
Tested with 5.8.0 as well as with 5.6.1.
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=medium
---
Site configuration information for perl v5.6.1:
Configured by Administrator at Wed May 2 01:31:01 2001.
Summary of my perl5 (revision 5 version 6 subversion 1) configuration:
Platform:
osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread
uname=''
config_args='undef'
hint=recommended, useposix=true, d_sigaction=undef
usethreads=undef use5005threads=undef useithreads=define
usemultiplicity=define
useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
Compiler:
cc='cl', ccflags
='-nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT
-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX',
optimize='-O1 -MD -DNDEBUG',
cppflags='-DWIN32'
ccversion='', gccversion='', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=4
alignbytes=8, usemymalloc=n, prototype=define
Linker and Libraries:
ld='', ldflags
'-nologo -nodefaultlib -release -libpath:"d:\perl561\lib\CORE" -machine:x8
6'
libpth="D:\MSVStudio\VC98\LIB" "D:\MSVStudio\VC98\MFC\LIB"
"D:\apps\SQLLIB\LIB" "d:\perl561\lib\CORE"
libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib
uuid.lib wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib
msvcrt.lib
perllibs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib
uuid.lib wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib
msvcrt.lib
libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl56.lib
Dynamic Linking:
dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ',
ddlflags='-dll -nologo -nodefaultlib -release -libpath:"d:\perl561\lib\CORE
" -machine:x86'
Locally applied patches:
ACTIVEPERL_LOCAL_PATCHES_ENTRY
---
@INC for perl v5.6.1:
D:\Work\PerlScripts\utl
D:\Work\PerlScripts\translations
D:\Work\PerlScripts\sgml
D:\Work\PerlScripts\pleps
d:/perl561/lib
d:/perl561/site/lib
.
---
Environment for perl v5.6.1:
HOME=d:\apps
LANG (unset)
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=C:\WINNT\system32;C:\WINNT;C:\WINNT\system32\WBEM;d:\sh;d:\perl561\bin;
d:\apps\tcl\bin;D:\MSVStudio\Common\msdev98\BIN;D:\MSVStudio\VC98\BIN;D:\MSV
Studio\Common\TOOLS\WINNT;D:\MSVStudio\Common\TOOLS;d:\apps\vim;d:\apps\vsli
ck-40\win;d:\bin;d:\cygwin\bin;d:\borland\cbuilder5\bin;d:\apps\JGenerator
2.1 MX\bin;C:\Program Files\Common Files\Adaptec Shared\System;C:\Program
Files\Common Files\Autodesk Shared\
PERL5CFG=d:\apps
PERL5LIB=D:\Work\PerlScripts\utl;D:\Work\PerlScripts\translations;D:\Work\Pe
rlScripts\sgml;D:\Work\PerlScripts\pleps
PERL_BADLANG (unset)
SHELL (unset)
Thread Next
-
[perl #21322] Closures could leak memory
by Vadim Konovalov