develooper Front page | perl.perl5.porters | Postings from October 2016

[perl #129788] [PATCH] Fix possible memory leak in IO::Poll

Thread Previous
From:
Sergey Aleynikov
Date:
October 2, 2016 19:55
Subject:
[perl #129788] [PATCH] Fix possible memory leak in IO::Poll
Message ID:
rt-4.0.24-19650-1475438093-308.129788-75-0@perl.org
# New Ticket Created by  Sergey Aleynikov 
# Please include the string:  [perl #129788]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=129788 >


This is a bug report for perl from sergey.aleynikov@gmail.com,
generated with the help of perlbug 1.40 running under perl 5.22.1.


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

Under some exotic circumstances IO::Poll::_poll() could leak memory.
Sample test case is:

use IO::Poll;

sub TIESCALAR { bless {} }
sub FETCH { die }

tie(my $foo, __PACKAGE__);

while (1) {
    eval { IO::Poll::_poll(0, 1..10_000, $foo, 1) }
}

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=library
    severity=low
    Type=Patch
    PatchStatus=HasPatch
    module=IO::Poll
---
Site configuration information for perl 5.22.1:

Configured by dur-randir at Mon Dec 14 02:53:24 MSK 2015.

Summary of my perl5 (revision 5 version 22 subversion 1) configuration:

  Platform:
    osname=darwin, osvers=13.4.0, archname=darwin-2level
    uname='darwin isengard.local 13.4.0 darwin kernel version 13.4.0:
wed mar 18 16:20:14 pdt 2015; root:xnu-2422.115.14~1release_x86_64
x86_64 '
    config_args='-de
-Dprefix=/Users/dur-randir/perlbrew/perls/perl-5.22.1
-Aeval:scriptdir=/Users/dur-randir/perlbrew/perls/perl-5.22.1/bin'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-fno-common -DPERL_DARWIN -fno-strict-aliasing
-pipe -fstack-protector -I/usr/local/include',
    optimize='-O3',
    cppflags='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.2.1 Compatible Apple LLVM 6.0
(clang-600.0.56)', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8,
byteorder=12345678, doublekind=3
    d_longlong=define, longlongsize=8, d_longdbl=define,
longdblsize=16, longdblkind=3
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags ='
-fstack-protector -L/usr/local/lib'
    libpth=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0/lib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/lib
/usr/local/lib /usr/lib
    libs=-lpthread -lgdbm -ldbm -ldl -lm -lutil -lc
    perllibs=-lpthread -ldl -lm -lutil -lc
    libc=, so=dylib, useshrplib=false, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup
-L/usr/local/lib -fstack-protector'


---
@INC for perl 5.22.1:
    /Users/dur-randir/perlbrew/perls/perl-5.22.1/lib/site_perl/5.22.1/darwin-2level
    /Users/dur-randir/perlbrew/perls/perl-5.22.1/lib/site_perl/5.22.1
    /Users/dur-randir/perlbrew/perls/perl-5.22.1/lib/5.22.1/darwin-2level
    /Users/dur-randir/perlbrew/perls/perl-5.22.1/lib/5.22.1
    .

---
Environment for perl 5.22.1:
    DYLD_LIBRARY_PATH (unset)
    HOME=/Users/dur-randir
    LANG=en_US.UTF-8
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/Users/dur-randir/perlbrew/bin:/Users/dur-randir/perlbrew/perls/perl-5.22.1/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/texbin
    PERLBREW_BASHRC_VERSION=0.69
    PERLBREW_HOME=/Users/dur-randir/.perlbrew
    PERLBREW_MANPATH=/Users/dur-randir/perlbrew/perls/perl-5.22.1/man
    PERLBREW_PATH=/Users/dur-randir/perlbrew/bin:/Users/dur-randir/perlbrew/perls/perl-5.22.1/bin
    PERLBREW_PERL=perl-5.22.1
    PERLBREW_ROOT=/Users/dur-randir/perlbrew
    PERLBREW_VERSION=0.69
    PERL_BADLANG (unset)
    SHELL=/usr/local/bin/zsh

Thread Previous


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