develooper Front page | perl.perl5.porters | Postings from April 2014

Memory leak in backticks and system

Thread Next
From:
=?iso-8859-1?Q?Jesper_J=F8rgen_Persson?=
Date:
April 10, 2014 15:42
Subject:
Memory leak in backticks and system
Message ID:
14FA312EEBCFAF43AB2709DDDFFFFF2C01F98A9C2E@exchange.cphdomain.com
This is a bug report for perl from jjp@siteimprove.com,
generated with the help of perlbug 1.39 running under perl 5.18.2.


-----------------------------------------------------------------
[Please describe your issue here]

This little piece of perl code eats memory very fast:

while(1){
`dir c:\\`;
}

that also goes for this perl code:

while(1){
   system("dir c:\\");
}

I have reproduced this on both windows 7 64 bit and windows 8.1 64 bit with strawberry-perl 5.18.2

Best Regards
Jesper Persson

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=high
---
Site configuration information for perl 5.18.2:

Configured by strawberry-perl at Tue Jan  7 22:34:04 2014.

Summary of my perl5 (revision 5 version 18 subversion 2) configuration:

  Platform:
    osname=MSWin32, osvers=6.2, archname=MSWin32-x64-multi-thread
    uname='Win32 strawberry-perl 5.18.2.1 #1 Tue Jan  7 22:32:35 2014 x64'
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags =' -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE  -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fno-strict-aliasing -mms-bitfields',
    optimize='-s -O2',
    cppflags='-DWIN32'
    ccversion='', gccversion='4.7.3', gccosandvers=''
    intsize=4, longsize=4, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='long long', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='g++', ldflags ='-s -L"C:\strawberry\perl\lib\CORE" -L"C:\strawberry\c\lib"'
    libpth=C:\strawberry\c\lib C:\strawberry\c\x86_64-w64-mingw32\lib C:\strawberry\c\lib\gcc\x86_64-w64-mingw32\4.7.3
    libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
    perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
    libc=, so=dll, useshrplib=true, libperl=libperl518.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-mdll -s -L"C:\strawberry\perl\lib\CORE" -L"C:\strawberry\c\lib"'

Locally applied patches:


---
@INC for perl 5.18.2:
    C:/strawberry/perl/site/lib
    C:/strawberry/perl/vendor/lib
    C:/strawberry/perl/lib
    .

---
Environment for perl 5.18.2:
    HOME (unset)
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\ActiveState Komodo Edit 6\;C:\oracle\orac112x64;C:\oracle\orac112x64\bin;C:\oracle\product\10.2.0\client_1\bin;C:\oracle\product\11.2.0\client_1\bin;C:\Perl\site\bin;C:\Perl\bin;C:\Perl64\site\bin;C:\Perl64\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\10.0\DLLShared\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\instantclient\instantclient_11_2;C:\instantclient\instantclient_11_2_32;c:\Program Files (x86)\VeryPDF PDF2TXT v3.2;C:\oracle\odac112\bin;C:\oracle\odac112\;C:\Program Files (x86)\All2Txt;c:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\Microsoft SDKs\TypeScript\0.8.1.0\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\0.8.0.0\;C:\download\7za920 (1);C:\download\phantomChecker;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\QuickTime\QTSystem\;C:\svn\siteimprove\searchimprove\scripts;C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;C:\download\PSTools;C:\oracle\11.1\odac;C:\oracle\11.1\odac\bin;C:\Program Files (x86)\IDM Computer Solutions\UltraEdit\
    PERL_BADLANG (unset)
    SHELL (unset)


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About