develooper Front page | perl.perl5.porters | Postings from February 2009

[perl #63110] Perl bug

Thread Next
From:
Cary Millsap
Date:
February 9, 2009 03:25
Subject:
[perl #63110] Perl bug
Message ID:
rt-3.6.HEAD-12283-1234154958-1130.63110-75-0@perl.org
# New Ticket Created by  Cary Millsap 
# Please include the string:  [perl #63110]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=63110 >


This is a bug report for perl from cary.millsap@gmail.com,
generated with the help of perlbug 1.36 running under perl 5.10.0.


-----------------------------------------------------------------

Here is a test case that reproduces a memory leak. Repro instructions are
within the introductory comment.

#!/usr/bin/perl

# Demonstrate an apparent memory leak when using use feature qw(:5.10) with
# /gee. To reproduce the problem, run this script with a large input file.
On
# my system (Perl v5.10.0 Binary build 1004 [287188] on Mac OS X v10.5.6), I
# can run RSIZE~1GB, VSIZE~1GB with a 468MB input file. When I run with the
# 'use feature' line commented out, I can run with RSIZE=1.66MB,
VSIZE=18.97MB.

use strict;
use warnings;
use feature qw(:5.10);    # Remove this line, and the memory leak does not
occur.
my $group_expr = '$1';
while (<>) {
    my $bucket;
    if (/^(\w+)/) {
        ($bucket = $group_expr) =~ s/(\$\w+)/$1/gee;
    }
}


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

Configured by ActiveState at Wed Sep  3 12:30:38 PDT 2008.

Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
  Platform:
    osname=darwin, osvers=9.4.0, archname=darwin-thread-multi-2level
    uname='darwin kitty 9.4.0 darwin kernel version 9.4.0: mon jun 9
19:30:53 pdt 2008; root:xnu-1228.5.20~1release_i386 i386 '
    config_args='-ders -Dcc=gcc -Dusethreads -Duseithreads -Ud_sigsetjmp
-Uinstallusrbinperl -Ulocincpth= -Uloclibpth= -Ud_poll -Ui_poll
-Ud_sockatmark -Ud_sockatmarkproto -Ud_pthread_atfork -Ud_msg -Ud_lchown
-Ud_attribute_format -Ud_attribute_malloc -Ud_attribute_nonnull
-Ud_attribute_noreturn -Ud_attribute_pure -Ud_attribute_unused
-Ud_attribute_warn_unused_result -Ui_libutil
-Aldflags=-Wl,-search_paths_first -Alddlflags=-Wl,-search_paths_first
-Accflags=-arch ppc -arch i386 -Aldflags=-arch ppc -arch i386
-Alddlflags=-arch ppc -arch i386 -Accflags=-nostdinc
-B/Developer/SDKs/MacOSX10.4u.sdk/usr/include/gcc
-B/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc
-isystem/Developer/SDKs/MacOSX10.4u.sdk/usr/include
-F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks
-mmacosx-version-min=10.3
-Aldflags=-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk
-mmacosx-version-min=10.3
-Alddlflags=-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk
-mmacosx-version-min=10.3 -Accflags=-DUSE_SITECUSTOMIZE -Duselargefiles
-Accflags=-DPRIVLIB_LAST_IN_INC -Dprefix=/usr/local/ActivePerl-5.10
-Dprivlib=/usr/local/ActivePerl-5.10/lib
-Darchlib=/usr/local/ActivePerl-5.10/lib
-Dsiteprefix=/usr/local/ActivePerl-5.10/site
-Dsitelib=/usr/local/ActivePerl-5.10/site/lib
-Dsitearch=/usr/local/ActivePerl-5.10/site/lib -Dsed=/usr/bin/sed
-Duseshrplib -Dcf_by=ActiveState -Dcf_email=support@ActiveState.com'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-fno-common -DPERL_DARWIN -no-cpp-precomp -arch ppc
-arch i386 -nostdinc -B/Developer/SDKs/MacOSX10.4u.sdk/usr/include/gcc
-B/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc
-isystem/Developer/SDKs/MacOSX10.4u.sdk/usr/include
-F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks
-mmacosx-version-min=10.3 -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC
-fno-strict-aliasing -pipe',
    optimize='-O3',
    cppflags='-no-cpp-precomp -fno-common -DPERL_DARWIN -no-cpp-precomp
-arch ppc -nostdinc -B/Developer/SDKs/MacOSX10.4u.sdk/usr/include/gcc
-B/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc
-isystem/Developer/SDKs/MacOSX10.4u.sdk/usr/include
-F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks
-mmacosx-version-min=10.3 -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC
-fno-strict-aliasing -pipe'
    ccversion='', gccversion='i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1
(Apple Inc. build 5488)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=4, 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 ='
-Wl,-search_paths_first -arch ppc -arch i386
-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.3'
    libpth=/usr/lib
    libs=-ldbm -ldl -lm -lc
    perllibs=-ldl -lm -lc
    libc=, so=dylib, useshrplib=true, libperl=libperl.dylib
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup
-Wl,-search_paths_first -arch ppc -arch i386
-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.3'

Locally applied patches:
    ACTIVEPERL_LOCAL_PATCHES_ENTRY
    33741 avoids segfaults invoking S_raise_signal() (on Linux)
    33763 Win32 process ids can have more than 16 bits
    32809 Load 'loadable object' with non-default file extension
    32728 64-bit fix for Time::Local

---
@INC for perl 5.10.0:
    /Users/carymillsap/Documents/Development/TFK-workspace/trace-tools/
    /usr/local/ActivePerl-5.10/site/bin
    /Users/carymillsap/Library/ActivePerl-5.10/lib
    /usr/local/ActivePerl-5.10/site/lib
    /usr/local/ActivePerl-5.10/lib
    .

---
Environment for perl 5.10.0:
    DYLD_LIBRARY_PATH (unset)
    HOME=/Users/carymillsap
    LANG=en_US.UTF-8
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)

PATH=.:/usr/local/ActivePerl-5.10/bin:/usr/local/ActivePerl-5.10/site/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

PERL5LIB=/Users/carymillsap/Documents/Development/TFK-workspace/trace-tools/:/usr/local/ActivePerl-5.10/site/bin
    PERLDIR=/usr/local/ActivePerl-5.10
    PERL_BADLANG (unset)
    SHELL=/bin/bash

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